aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 276140654305..e9075fdef695 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2813,6 +2813,15 @@ void free_pages_exact(void *virt, size_t size)
2813} 2813}
2814EXPORT_SYMBOL(free_pages_exact); 2814EXPORT_SYMBOL(free_pages_exact);
2815 2815
2816/**
2817 * nr_free_zone_pages - count number of pages beyond high watermark
2818 * @offset: The zone index of the highest zone
2819 *
2820 * nr_free_zone_pages() counts the number of counts pages which are beyond the
2821 * high watermark within all zones at or below a given zone index. For each
2822 * zone, the number of pages is calculated as:
2823 * present_pages - high_pages
2824 */
2816static unsigned long nr_free_zone_pages(int offset) 2825static unsigned long nr_free_zone_pages(int offset)
2817{ 2826{
2818 struct zoneref *z; 2827 struct zoneref *z;
@@ -2833,8 +2842,11 @@ static unsigned long nr_free_zone_pages(int offset)
2833 return sum; 2842 return sum;
2834} 2843}
2835 2844
2836/* 2845/**
2837 * Amount of free RAM allocatable within ZONE_DMA and ZONE_NORMAL 2846 * nr_free_buffer_pages - count number of pages beyond high watermark
2847 *
2848 * nr_free_buffer_pages() counts the number of pages which are beyond the high
2849 * watermark within ZONE_DMA and ZONE_NORMAL.
2838 */ 2850 */
2839unsigned long nr_free_buffer_pages(void) 2851unsigned long nr_free_buffer_pages(void)
2840{ 2852{
@@ -2842,8 +2854,11 @@ unsigned long nr_free_buffer_pages(void)
2842} 2854}
2843EXPORT_SYMBOL_GPL(nr_free_buffer_pages); 2855EXPORT_SYMBOL_GPL(nr_free_buffer_pages);
2844 2856
2845/* 2857/**
2846 * Amount of free RAM allocatable within all zones 2858 * nr_free_pagecache_pages - count number of pages beyond high watermark
2859 *
2860 * nr_free_pagecache_pages() counts the number of pages which are beyond the
2861 * high watermark within all zones.
2847 */ 2862 */
2848unsigned long nr_free_pagecache_pages(void) 2863unsigned long nr_free_pagecache_pages(void)
2849{ 2864{