[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9abc9cb8-8734-90b0-c495-8df89c7bb579@redhat.com>
Date: Mon, 31 Jan 2022 12:25:05 -0500
From: Waiman Long <longman@...hat.com>
To: Roman Gushchin <guro@...com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-mm@...ck.org,
Shakeel Butt <shakeelb@...gle.com>,
Muchun Song <songmuchun@...edance.com>
Subject: Re: [PATCH 1/3] mm, memcg: Don't put offlined memcg into local stock
On 1/31/22 12:19, Roman Gushchin wrote:
> On Mon, Jan 31, 2022 at 12:15:19PM -0500, Waiman Long wrote:
>> On 1/31/22 12:09, 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@...hat.com>
>> BTW, have you posted it to lkml? If not, would you mind doing so?
> Not yet.
>
> I was waiting for Alexander to confirm that it resolves the originally reported
> issue. I just pinged him, will wait for tomorrow and post the patch in any case.
>
> Thanks!
I see. This is not a problem that is easily reproducible. You need to
hit the right timing for the lockdep splat to appear.
Regards,
Longman
Powered by blists - more mailing lists