lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod5CiU8qKNCo7gjh5O=BSGkM8Hj3Jr9ppmoWq+YY7w19Nw@mail.gmail.com>
Date:   Tue, 16 Jun 2020 19:59:40 -0700
From:   Shakeel Butt <shakeelb@...gle.com>
To:     Roman Gushchin <guro@...com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Lameter <cl@...ux.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Linux MM <linux-mm@...ck.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Kernel Team <kernel-team@...com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 01/19] mm: memcg: factor out memcg- and lruvec-level
 changes out of __mod_lruvec_state()

On Tue, Jun 16, 2020 at 7:50 PM Roman Gushchin <guro@...com> wrote:
>
> On Tue, Jun 16, 2020 at 06:52:09PM -0700, Shakeel Butt wrote:
> > On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin <guro@...com> wrote:
> > >
> > > To convert memcg and lruvec slab counters to bytes there must be
> > > a way to change these counters without touching node counters.
> > > Factor out __mod_memcg_lruvec_state() out of __mod_lruvec_state().
> > >
> > > Signed-off-by: Roman Gushchin <guro@...com>
> > > Acked-by: Johannes Weiner <hannes@...xchg.org>
> > > Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
> > > ---
> > >  include/linux/memcontrol.h | 17 +++++++++++++++
> > >  mm/memcontrol.c            | 43 +++++++++++++++++++++-----------------
> > >  2 files changed, 41 insertions(+), 19 deletions(-)
> > >
> > > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> > > index bbf624a7f5a6..93dbc7f9d8b8 100644
> > > --- a/include/linux/memcontrol.h
> > > +++ b/include/linux/memcontrol.h
> > > @@ -679,11 +679,23 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec,
> > >         return x;
> > >  }
> > >
> > > +void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
> > > +                             int val);
> > >  void __mod_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
> > >                         int val);
> > >  void __mod_lruvec_slab_state(void *p, enum node_stat_item idx, int val);
> > >  void mod_memcg_obj_state(void *p, int idx, int val);
> > >
> > > +static inline void mod_memcg_lruvec_state(struct lruvec *lruvec,
> > > +                                         enum node_stat_item idx, int val)
> >
> > Is this function used in later patches? Any benefit introducing it
> > here instead of in the patch where it is used for the first time?
>
> Yes, it's used in "mm: memcg/slab: charge individual slab objects instead of pages".
>
> It's a fairly large patchset with many internal dependencies, so there is
> always a trade-off between putting everything into a single patch, which is
> hard to review, and splitting out some changes, which make not much sense
> without seeing the whole picture.
>
> In this particular case splitting out a formal and easy-to-verify change makes
> the actual non-trivial patch smaller and hopefully easier for a review.
>
> But of course it's all subjective.
>
> Thanks!

I am fine with that.

Reviewed-by: Shakeel Butt <shakeelb@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ