Re: [RFC][PATCH 3/3] alloc contig pages with migration.

From: Minchan Kim
Date: Mon Oct 18 2010 - 01:19:26 EST


On Mon, Oct 18, 2010 at 9:35 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
>> > + * @node:       the node from which memory is allocated. "-1" means anywhere.
>> > + * @no_search: if true, "hint" is not a hint, requirement.
>>
>> As I said previous, how about "strict" or "ALLOC_FIXED" like MAP_FIXED?
>>
>
> If "range" is an argument, ALLOC_FIXED is not necessary. I'll add "range".

Sounds good.

>
>> > + *
>> > + * Search an area of @size in the physical memory map and checks wheter
>>
>> Typo
>> whether
>>
>> > + * we can create a contigous free space. If it seems possible, try to
>> > + * create contigous space with page migration. If no_search==true, we just try
>> > + * to allocate [hint, hint+size) range of pages as contigous block.
>> > + *
>> > + * Returns a page of the beginning of contiguous block. At failure, NULL
>> > + * is returned. Each page in the area is set to page_count() = 1. Because
>>
>> Why do you mention page_count() = 1?
>> Do users of this function have to know it?
>
> A user can free any page within the range for his purpose.

I think it's not a good idea if we allow handling of page by page, not
for page-chunk requested by user.
By mistake, free_contig_pages could have a trouble to free pages.
Why do you support the feature? Do you have any motivation?


--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/