lkml.org 
[lkml]   [2005]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] per thread page reservation patch
From
Date
Andrew Morton <akpm@osdl.org> writes:

> Vladimir Saveliev <vs@namesys.com> wrote:
>>
>> +int perthread_pages_reserve(int nrpages, int gfp)
>> +{
>> + int i;
>> + struct list_head accumulator;
>> + struct list_head *per_thread;
>> +
>> + per_thread = get_per_thread_pages();
>> + INIT_LIST_HEAD(&accumulator);
>> + list_splice_init(per_thread, &accumulator);
>> + for (i = 0; i < nrpages; ++i) {
>
> This will end up reserving more pages than were asked for, if
> current->private_pages_count is non-zero. Deliberate?

Yes. This is to make modular usage possible, so that


perthread_pages_reserve(nrpages, gfp_mask);

/* call some other code... */

perthread_pages_release(unused_pages);

works correctly if "some other code" does per-thread reservations
too.

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

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.129 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site