lkml.org 
[lkml]   [2004]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 2/3] alloc-order watermarks
Nick Piggin wrote:
> 2/3
>
>
> ------------------------------------------------------------------------
>
>
>
> Move the watermark checking code into a single function. Extend it to account
> for the order of the allocation and the number of free pages that could satisfy
> such a request.
>
> Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
>
>
> ---
>
> linux-2.6-npiggin/include/linux/mmzone.h | 2 +
> linux-2.6-npiggin/mm/page_alloc.c | 57 ++++++++++++++++++++-----------
> 2 files changed, 40 insertions(+), 19 deletions(-)
>
> diff -puN mm/page_alloc.c~vm-alloc-order-watermarks mm/page_alloc.c
> --- linux-2.6/mm/page_alloc.c~vm-alloc-order-watermarks 2004-09-05 14:55:46.000000000 +1000
> +++ linux-2.6-npiggin/mm/page_alloc.c 2004-09-05 15:10:07.000000000 +1000
> @@ -676,6 +676,36 @@ buffered_rmqueue(struct zone *zone, int
> }
>
> /*
> + * Return the number of pages available for order 'order' allocations.
> + */

Sorry, stale comment. It actually returns 1 if free pages are above the
watermark, 0 otherwise.

> +int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
> + int alloc_type, int can_try_harder, int gfp_high)
-
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:05    [W:0.045 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site