lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 Mar 2021 00:01:21 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Chengming Zhou <zhouchengming@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        dietmar.eggemann@....com, Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [External] Re: [PATCH v2 4/4] psi: Optimize task switch inside
 shared cgroups

On Wed, Mar 3, 2021 at 11:53 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Wed, Mar 03, 2021 at 11:46:59AM +0800, Chengming Zhou wrote:
> > The commit 36b238d57172 ("psi: Optimize switching tasks inside shared
> > cgroups") only update cgroups whose state actually changes during a
> > task switch only in task preempt case, not in task sleep case.
> >
> > We actually don't need to clear and set TSK_ONCPU state for common cgroups
> > of next and prev task in sleep case, that can save many psi_group_change
> > especially when most activity comes from one leaf cgroup.
> >
> > sleep before:
> > psi_dequeue()
> >   while ((group = iterate_groups(prev)))  # all ancestors
> >     psi_group_change(prev, .clear=TSK_RUNNING|TSK_ONCPU)
> > psi_task_switch()
> >   while ((group = iterate_groups(next)))  # all ancestors
> >     psi_group_change(next, .set=TSK_ONCPU)
> >
> > sleep after:
> > psi_dequeue()
> >   nop
> > psi_task_switch()
> >   while ((group = iterate_groups(next)))  # until (prev & next)
> >     psi_group_change(next, .set=TSK_ONCPU)
> >   while ((group = iterate_groups(prev)))  # all ancestors
> >     psi_group_change(prev, .clear=common?TSK_RUNNING:TSK_RUNNING|TSK_ONCPU)
> >
> > When a voluntary sleep switches to another task, we remove one call of
> > psi_group_change() for every common cgroup ancestor of the two tasks.
> >
> Co-developed-by: Muchun ?

Yes. Should Chengming send another version patch to add Co-developed-by tag?

> > Signed-off-by: Muchun Song <songmuchun@...edance.com>
> > Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ