public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <guro-b10kYP2dOMg@public.gmane.org>
To: Waiman Long <longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Vladimir Davydov
	<vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Vlastimil Babka <vbabka-AlSwsSmVLrQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Muchun Song <songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
Subject: Re: [PATCH 1/3] mm, memcg: Don't put offlined memcg into local stock
Date: Mon, 31 Jan 2022 09:15:41 -0800	[thread overview]
Message-ID: <YfgZPSs8H6PBCwdt@carbon.dhcp.thefacebook.com> (raw)
In-Reply-To: <95ba1931-e9c9-45c3-b080-d28f2ad368a7-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Mon, Jan 31, 2022 at 12:09:09PM -0500, Waiman Long wrote:
> On 1/31/22 12:01, Roman Gushchin wrote:
> > On Sun, Jan 30, 2022 at 10:55:56PM -0500, Waiman Long wrote:
> > > On 10/1/21 19:51, Roman Gushchin wrote:
> > > > On Fri, Oct 01, 2021 at 03:09:36PM -0400, Waiman Long wrote:
> > > > > When freeing a page associated with an offlined memcg, refill_stock()
> > > > > will put it into local stock delaying its demise until another memcg
> > > > > comes in to take its place in the stock. To avoid that, we now check
> > > > > for offlined memcg and go directly in this case to the slowpath for
> > > > > the uncharge via the repurposed cancel_charge() function.
> > > > Hi Waiman!
> > > > 
> > > > I'm afraid it can make a cleanup of a dying cgroup slower: for every
> > > > released page we'll potentially traverse the whole cgroup tree and
> > > > decrease atomic page counters.
> > > > 
> > > > I'm not sure I understand the benefits we get from this change which
> > > > do justify the slowdown on the cleanup path.
> > > > 
> > > > Thanks!
> > > I was notified of a lockdep splat that this patch may help to prevent.
> > Would you mind to test this patch:
> > https://www.spinics.net/lists/cgroups/msg31244.html  ?
> > 
> > It should address this dependency.
> 
> Thanks for the pointer. I believe that your patch should be able to address
> this circular locking dependency.
> 
> Feel free to add my
> 
> Reviewed-by: Waiman Long <longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Thank you!

  parent reply	other threads:[~2022-01-31 17:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 19:09 [PATCH 0/3] mm, memcg: Miscellaneous cleanups Waiman Long
     [not found] ` <20211001190938.14050-1-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-10-01 19:09   ` [PATCH 1/3] mm, memcg: Don't put offlined memcg into local stock Waiman Long
     [not found]     ` <20211001190938.14050-2-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-10-01 21:17       ` kernel test robot
2021-10-01 23:06       ` kernel test robot
2021-10-01 23:51       ` Roman Gushchin
     [not found]         ` <YVefHLo1+6lgw3aB-cx5fftMpWqeCjSd+JxjunQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2021-10-02  1:54           ` Waiman Long
2022-01-31  3:55           ` Waiman Long
2022-01-31 17:01             ` Roman Gushchin
2022-01-31 17:09               ` Waiman Long
2022-01-31 17:15                 ` Waiman Long
     [not found]                   ` <c950a93d-bb70-9a97-dabe-a1d58d755dad-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-01-31 17:19                     ` Roman Gushchin
     [not found]                       ` <YfgaIcSJhqEOnh65-cx5fftMpWqeCjSd+JxjunQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2022-01-31 17:25                         ` Waiman Long
     [not found]                           ` <9abc9cb8-8734-90b0-c495-8df89c7bb579-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-01-31 18:00                             ` Shakeel Butt
     [not found]                 ` <95ba1931-e9c9-45c3-b080-d28f2ad368a7-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-01-31 17:15                   ` Roman Gushchin [this message]
2021-10-01 19:09   ` [PATCH 2/3] mm, memcg: Remove obsolete memcg_free_kmem() Waiman Long
     [not found]     ` <20211001190938.14050-3-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-10-02  0:01       ` Roman Gushchin
2021-10-02  2:03         ` Waiman Long
2021-10-01 19:09   ` [PATCH 3/3] mm, memcg: Ensure valid memcg from objcg within a RCU critical section Waiman Long
     [not found]     ` <20211001190938.14050-4-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-10-01 20:24       ` Shakeel Butt
2021-10-01 20:34         ` Waiman Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfgZPSs8H6PBCwdt@carbon.dhcp.thefacebook.com \
    --to=guro-b10kyp2domg@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
    --cc=vbabka-AlSwsSmVLrQ@public.gmane.org \
    --cc=vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox