lkml.org 
[lkml]   [2007]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] memory hotremove patch take 2 [01/10] (counter of removable page)
On Wed, 9 May 2007, Yasunori Goto wrote:

>
> +unsigned int nr_free_movable_pages(void)
> +{
> + unsigned long nr_pages = 0;
> + struct zone *zone;
> + int nid;
> +
> + for_each_online_node(nid) {
> + zone = &(NODE_DATA(nid)->node_zones[ZONE_MOVABLE]);
> + nr_pages += zone_page_state(zone, NR_FREE_PAGES);
> + }
> + return nr_pages;
> +}


Hmmmm... This is redoing what the vm counters already provide

Could you add

NR_MOVABLE_PAGES etc.

instead and then let the ZVC counter logic take care of the rest?

With a ZVC you will have the numbers in each zone and also in
/proc/vmstat.

(Additional ulterior motive: If we ever get away from ZONE_MOVABLE and
make movable a portion of each zone then this will still work)
-
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: 2007-05-10 20:03    [W:0.119 / U:0.040 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site