[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220725141649.ou7tsntv4xnqtbmc@wittgenstein>
Date: Mon, 25 Jul 2022 16:16:49 +0200
From: Christian Brauner <brauner@...nel.org>
To: Tejun Heo <tj@...nel.org>
Cc: Michal Koutný <mkoutny@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
John Stultz <john.stultz@...aro.org>,
Dmitry Shmidt <dimitrysh@...gle.com>,
Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org
Subject: Re: [PATCH RESEND 3/3 cgroup/for-5.20] cgroup: Make !percpu
threadgroup_rwsem operations optional
On Sat, Jul 23, 2022 at 04:28:28AM -1000, Tejun Heo wrote:
> 3942a9bd7b58 ("locking, rcu, cgroup: Avoid synchronize_sched() in
> __cgroup_procs_write()") disabled percpu operations on threadgroup_rwsem
> because the impiled synchronize_rcu() on write locking was pushing up the
> latencies too much for android which constantly moves processes between
> cgroups.
>
> This makes the hotter paths - fork and exit - slower as they're always
> forced into the slow path. There is no reason to force this on everyone
> especially given that more common static usage pattern can now completely
> avoid write-locking the rwsem. Write-locking is elided when turning on and
> off controllers on empty sub-trees and CLONE_INTO_CGROUP enables seeding a
> cgroup without grabbing the rwsem.
>
> Restore the default percpu operations and introduce the mount option
> "favordynmods" and config option CGROUP_FAVOR_DYNMODS for users who need
> lower latencies for the dynamic operations.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Christian Brauner <brauner@...nel.org>
> Cc: Michal Koutný <mkoutny@...e.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: John Stultz <john.stultz@...aro.org>
> Cc: Dmitry Shmidt <dimitrysh@...gle.com>
> Cc: Oleg Nesterov <oleg@...hat.com>
> ---
Seems sane,
Acked-by: Christian Brauner (Microsoft) <brauner@...nel.org>
Powered by blists - more mailing lists