> This patch adds nid/zoneid value to page cgroup.
> This helps per-zone accounting for memory cgroup and reclaim routine.
> 
> Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
> 
>  mm/memcontrol.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> Index: linux-2.6.24-rc2-mm1/mm/memcontrol.c
> ===================================================================
> --- linux-2.6.24-rc2-mm1.orig/mm/memcontrol.c
> +++ linux-2.6.24-rc2-mm1/mm/memcontrol.c
> @@ -131,6 +131,8 @@ struct page_cgroup {
>       atomic_t ref_cnt;               /* Helpful when pages move b/w  */
>                                       /* mapped and cached states     */
>       int      flags;
> +     short   nid;
> +     short   zid;
>  };
>  #define PAGE_CGROUP_FLAG_CACHE       (0x1)   /* charged as cache */
>  #define PAGE_CGROUP_FLAG_ACTIVE (0x2)        /* page is active in this 
> cgroup */
> @@ -216,6 +218,10 @@ void page_assign_page_cgroup(struct page
>               VM_BUG_ON(!page_cgroup_locked(page));
>       locked = (page->page_cgroup & PAGE_CGROUP_LOCK);
>       page->page_cgroup = ((unsigned long)pc | locked);
> +     if (pc) {
> +             pc->nid = page_to_nid(page);
> +             pc->zid = page_zonenum(page);
> +     }
>  }
>  
>  struct page_cgroup *page_get_page_cgroup(struct page *page)

are they worth to be cached?
can't you use page_zonenum(pc->page)?

YAMAMOTO Takashi
_______________________________________________
Containers mailing list
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to