[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200820111445.GF5033@dhcp22.suse.cz>
Date: Thu, 20 Aug 2020 13:14:45 +0200
From: Michal Hocko <mhocko@...e.com>
To: Christian Brauner <christian.brauner@...ntu.com>
Cc: Suren Baghdasaryan <surenb@...gle.com>, mingo@...nel.org,
peterz@...radead.org, tglx@...utronix.de, esyr@...hat.com,
christian@...lner.me, areber@...hat.com, shakeelb@...gle.com,
cyphar@...har.com, oleg@...hat.com, adobriyan@...il.com,
akpm@...ux-foundation.org, ebiederm@...ssion.com,
gladkov.alexey@...il.com, walken@...gle.com,
daniel.m.jordan@...cle.com, avagin@...il.com,
bernd.edlinger@...mail.de, john.johansen@...onical.com,
laoar.shao@...il.com, timmurray@...gle.com, minchan@...nel.org,
kernel-team@...roid.com, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in
__set_oom_adj when not necessary
On Thu 20-08-20 12:32:48, Christian Brauner wrote:
> On Thu, Aug 20, 2020 at 11:09:01AM +0200, Michal Hocko wrote:
> > On Thu 20-08-20 10:46:54, Christian Brauner wrote:
[...]
> > > > which includes processes with multiple threads (sharing mm and signals).
> > > > However for such processes the loop is unnecessary because their signal
> > > > structure is shared as well.
>
> and it seems you want to exclude threads, i.e. only update mm that is
> shared not among threads in the same thread-group.
> But struct signal and struct sighand_struct are different things, i.e.
> they can be shared or not independent of each other. A non-shared
> signal_struct where oom_score_adj{_min} live is only implied by
> !CLONE_THREAD. So shouldn't this be:
>
> if (!(clone_flags & CLONE_THREAD)) rather than CLONE_SIGHAND?
You are right as I have already replied to Oleg.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists