[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce048e8b-bd2d-7517-d8e0-f74be98b8dee@redhat.com>
Date: Wed, 4 Aug 2021 12:00:47 -0400
From: Waiman Long <llong@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>,
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>, Roman Gushchin <guro@...com>
Cc: linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
linux-mm@...ck.org, Shakeel Butt <shakeelb@...gle.com>,
Muchun Song <songmuchun@...edance.com>,
Luis Goncalves <lgoncalv@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] mm/memcg: Disable task obj_stock for PREEMPT_RT
On 8/3/21 9:40 PM, Waiman Long wrote:
> On 8/3/21 7:21 PM, Thomas Gleixner wrote:
>> To complete the analysis of drain_local_stock(). AFAICT that function
>> can only be called from task context. So what is the purpose of this
>> in_task() conditional there?
>>
>> if (in_task())
>> drain_obj_stock(&stock->task_obj);
> I haven't done a full analysis to see if it can be called from task
> context only. Maybe in_task() check isn't needed, but having it there
> provides the safety that it will still work in case it can be called
> from interrupt context.
After looking at possible call chains that can lead to
drain_local_stock(), one call chain comes from the allocation of slab
objects which I had previously determined to be callable from interrupt
context. So it is prudent to add a in_task() check here.
Cheers,
Longman
Powered by blists - more mailing lists