From cf5416ee2fc3270245104e643f486392b2b40f67 Mon Sep 17 00:00:00 2001 From: Zhang Yanfei Date: Fri, 22 Feb 2013 16:35:54 -0800 Subject: [PATCH] --- yaml --- r: 356620 b: refs/heads/master c: e0fb58152955142f48ed31c8c0541b53e094da6b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/page_alloc.c | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2ff3f39b00e9..c80d2d69bf60 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f4b9fc5c1d3c8fc6037fa99d527ad3264dc0038 +refs/heads/master: e0fb58152955142f48ed31c8c0541b53e094da6b diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index 276140654305..e9075fdef695 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -2813,6 +2813,15 @@ void free_pages_exact(void *virt, size_t size) } EXPORT_SYMBOL(free_pages_exact); +/** + * nr_free_zone_pages - count number of pages beyond high watermark + * @offset: The zone index of the highest zone + * + * nr_free_zone_pages() counts the number of counts pages which are beyond the + * high watermark within all zones at or below a given zone index. For each + * zone, the number of pages is calculated as: + * present_pages - high_pages + */ static unsigned long nr_free_zone_pages(int offset) { struct zoneref *z; @@ -2833,8 +2842,11 @@ static unsigned long nr_free_zone_pages(int offset) return sum; } -/* - * Amount of free RAM allocatable within ZONE_DMA and ZONE_NORMAL +/** + * nr_free_buffer_pages - count number of pages beyond high watermark + * + * nr_free_buffer_pages() counts the number of pages which are beyond the high + * watermark within ZONE_DMA and ZONE_NORMAL. */ unsigned long nr_free_buffer_pages(void) { @@ -2842,8 +2854,11 @@ unsigned long nr_free_buffer_pages(void) } EXPORT_SYMBOL_GPL(nr_free_buffer_pages); -/* - * Amount of free RAM allocatable within all zones +/** + * nr_free_pagecache_pages - count number of pages beyond high watermark + * + * nr_free_pagecache_pages() counts the number of pages which are beyond the + * high watermark within all zones. */ unsigned long nr_free_pagecache_pages(void) {