Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356620
b: refs/heads/master
c: e0fb581
h: refs/heads/master
v: v3
  • Loading branch information
Zhang Yanfei authored and Linus Torvalds committed Feb 24, 2013
1 parent 7bb49ec commit cf5416e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f4b9fc5c1d3c8fc6037fa99d527ad3264dc0038
refs/heads/master: e0fb58152955142f48ed31c8c0541b53e094da6b
23 changes: 19 additions & 4 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -2833,17 +2842,23 @@ 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)
{
return nr_free_zone_pages(gfp_zone(GFP_USER));
}
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)
{
Expand Down

0 comments on commit cf5416e

Please sign in to comment.