lkml.org 
[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 1/4] memcg: fix for mem_cgroup_get_reclaim_stat_from_page
    On Fri, 09 Jan 2009 08:57:59 +0800
    Li Zefan <lizf@cn.fujitsu.com> wrote:

    > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
    > > index e2996b8..62e69d8 100644
    > > --- a/mm/memcontrol.c
    > > +++ b/mm/memcontrol.c
    > > @@ -559,6 +559,10 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page)
    > > return NULL;
    > >
    > > pc = lookup_page_cgroup(page);
    > > + smp_rmb();
    >
    > It is better to add a comment to explain this smp_rmb. I think it's recommended
    > that every memory barrier has a comment.
    >
    Ah, yes. good point.

    Maybe text like this
    /*
    * Used bit is set without atomic ops but after smp_wmb().
    * For making pc->mem_cgroup visible, insert smp_rmb() here.
    */

    ?
    -Kame



    \
     
     \ /
      Last update: 2009-01-09 02:09    [W:0.025 / U:1.328 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site