[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-mm
Subject: Re: [Lhms-devel] Re: [RFC] buddy allocator without bitmap(2) [0/3]
From: Hiroyuki KAMEZAWA <kamezawa.hiroyu () jp ! fujitsu ! com>
Date: 2004-08-31 22:44:32
Message-ID: 4134FF50.8000300 () jp ! fujitsu ! com
[Download RAW message or body]
Dave Hansen wrote:
> On Tue, 2004-08-31 at 03:36, Hiroyuki KAMEZAWA wrote:
>
>>Disadvantage:
>> - using one more PG_xxx flag.
>> - If mem_map is not aligned, reserve one page as a victim for buddy allocater.
>>
>>How about this approach ?
>
>
> Granted, we have some free wiggle room in page->flags right now, but
> using another bit effectively shifts the entire benefit of your patch.
> Instead of getting rid of the buddy bitmaps, you simply consume a
> page->flag instead. While you don't have to allocate anything (because
> of the page->flags use), the number of bits consumed in the operation is
> still the same as before. And the patch is getting more complex by the
> minute.
Hmm...I understand what you say. Consuming PG_xxx bit in buddy allocator is harmful
because no PG_xxx bit is used in current kernel's one.
What this patch implements is
"How to record shape of the mem_map needed by buddy allocator without using some
structure which must be resized at memory resizing."
Because I had to record some information about shape of mem_map, I used PG_xxx bit.
1 bit is maybe minimum consumption.
If consumption of 1 bit in a page structure is too harmful,
I have to record information in some structure which needs to be resized
at memory resizing. When I do so, this patch itself is meaningless, I think.
I'll consider more, but...
> Something ate your patch:
>
> * Global page accounting. One instance per CPU. Only unsigned longs are
> @@ -290,6 +297,9 @@ extern unsigned long __read_page_state(u
> #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags)
> #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags)
>
> +#define PageBuddyend(page) test_bit(PG_buddyend, &(page)->flags)
> +#define SetPageBuddyend(page) set_bit(PG_buddyend, &(page)->flags)
> +
> #ifdef CONFIG_SWAP
> #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags)
> #define SetPageSwapCache(page) set_bit(PG_swapcache, &(page)->flags)
>
>
> -- Dave
--
--the clue is these footmarks leading to the door.--
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic