Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Michal Hocko
On Tue 25-08-20 10:36:45, Suren Baghdasaryan wrote: > On Tue, Aug 25, 2020 at 9:38 AM Eric W. Biederman > wrote: [...] > > > diff --git a/include/linux/oom.h b/include/linux/oom.h > > > index f022f581ac29..861f22bd4706 100644 > > > --- a/include/linux/oom.h > > > +++ b/include/linux/oom.h > > >

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Suren Baghdasaryan
On Tue, Aug 25, 2020 at 9:38 AM Eric W. Biederman wrote: > > Suren Baghdasaryan writes: > > > Currently __set_oom_adj loops through all processes in the system to > > keep oom_score_adj and oom_score_adj_min in sync between processes > > sharing their mm. This is done for any task with more that

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Eric W. Biederman
Suren Baghdasaryan writes: > Currently __set_oom_adj loops through all processes in the system to > keep oom_score_adj and oom_score_adj_min in sync between processes > sharing their mm. This is done for any task with more that one mm_users, > which includes processes with multiple threads

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Oleg Nesterov
On 08/25, Michal Hocko wrote: > > Btw. now that the flag is in place we can optimize __oom_kill_process as > well. and zap_threads(). Oleg.

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Michal Hocko
On Mon 24-08-20 08:30:36, Suren Baghdasaryan wrote: > Currently __set_oom_adj loops through all processes in the system to > keep oom_score_adj and oom_score_adj_min in sync between processes > sharing their mm. This is done for any task with more that one mm_users, > which includes processes with

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Christian Brauner
On Tue, Aug 25, 2020 at 07:24:34AM -0700, Suren Baghdasaryan wrote: > On Tue, Aug 25, 2020 at 4:15 AM Christian Brauner > wrote: > > > > On Mon, Aug 24, 2020 at 08:30:36AM -0700, Suren Baghdasaryan wrote: > > > Currently __set_oom_adj loops through all processes in the system to > > > keep

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Oleg Nesterov
On 08/24, Suren Baghdasaryan wrote: > > v2: > - Implemented proposal from Michal Hocko in: > https://lore.kernel.org/linux-fsdevel/20200820124109.gi5...@dhcp22.suse.cz/ > - Updated description to reflect the change Looks good to me, Oleg.

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Suren Baghdasaryan
On Tue, Aug 25, 2020 at 4:15 AM Christian Brauner wrote: > > On Mon, Aug 24, 2020 at 08:30:36AM -0700, Suren Baghdasaryan wrote: > > Currently __set_oom_adj loops through all processes in the system to > > keep oom_score_adj and oom_score_adj_min in sync between processes > > sharing their mm.

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Christian Brauner
On Mon, Aug 24, 2020 at 08:30:36AM -0700, Suren Baghdasaryan wrote: > Currently __set_oom_adj loops through all processes in the system to > keep oom_score_adj and oom_score_adj_min in sync between processes > sharing their mm. This is done for any task with more that one mm_users, > which

[PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-24 Thread Suren Baghdasaryan
Currently __set_oom_adj loops through all processes in the system to keep oom_score_adj and oom_score_adj_min in sync between processes sharing their mm. This is done for any task with more that one mm_users, which includes processes with multiple threads (sharing mm and signals). However for such