lkml.org 
[lkml]   [2020]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mm: memcontrol: Simplify the mem_cgroup_page_lruvec
On Thu 29-10-20 09:01:37, Shakeel Butt wrote:
> On Thu, Oct 29, 2020 at 2:08 AM Michal Hocko <mhocko@suse.com> wrote:
> >
> > On Wed 28-10-20 11:50:13, Muchun Song wrote:
> > [...]
> > > -struct lruvec *mem_cgroup_page_lruvec(struct page *page, struct pglist_data *pgdat)
> > > +static struct lruvec *
> > > +__mem_cgroup_node_lruvec(struct mem_cgroup *memcg, struct pglist_data *pgdat,
> > > + int nid)
> >
> > I thought I have made it clear that this is not a good approach. Please
> > do not repost new version without that being addressed. If there are any
> > questions then feel free to ask for details.
>
> You can get nid from pgdat (pgdat->node_id) and also pgdat from nid
> (NODE_DATA(nid)), so, __mem_cgroup_node_lruvec() only need one of them
> as parameter.

Exactly what I've said in the previous version review. I suspect that
the issue is that mem_cgroup_page_nodeinfo (based on page's node_id)
and the given pgdat can mismatch in the existing code but that shouldn't
be a real problem because the mismatch can only happen for lruvec->pgdat
== NULL unless I am missing something.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2020-10-29 17:15    [W:0.055 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site