From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Bristot de Oliveira Subject: Re: [PATCH 2/6] sched/cpuset: Bring back cpuset_mutex Date: Wed, 26 Apr 2023 16:31:09 +0200 Message-ID: <10fdfdd8-06bc-0f35-0fea-e604aa5c103a@redhat.com> References: <20230329125558.255239-1-juri.lelli@redhat.com> <20230329125558.255239-3-juri.lelli@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682519474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x0YRJ7TlPoY9IYDWRjmvki/mO0TL+b3mD3tzGtLzoUc=; b=FGGwXsJdjZL6AC3t2yAOiFXB86dk4ifPNSwMF4LokYKW35ZK7v3jIX5crX5IwVpWhr/Agv CA1u0RV50rXUT4aarKAAtc7zkLVuBGlNVNoBD1msuXWfax6aMq6vkTZ8ZPWPBt8gTvd07p cQUbj62HcUYiy/ixIhUWGwfY2Kl4kIs= Content-Language: en-US In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" To: Juri Lelli , Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Qais Yousef , Tejun Heo , Zefan Li , Johannes Weiner , Hao Luo , Dietmar Eggemann , Steven Rostedt , linux-kernel@vger.kernel.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, mathieu.poirier@linaro.org, cgroups@vger.kernel.org, Vincent Guittot , Wei Wang , Rick Yiu , Quentin Perret , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sudeep Holla <> On 4/26/23 13:57, Juri Lelli wrote: > On 04/04/23 13:31, Waiman Long wrote: >> On 3/29/23 08:55, Juri Lelli wrote: >>> Turns out percpu_cpuset_rwsem - commit 1243dc518c9d ("cgroup/cpuset: >>> Convert cpuset_mutex to percpu_rwsem") - wasn't such a brilliant idea, >>> as it has been reported to cause slowdowns in workloads that need to >>> change cpuset configuration frequently and it is also not implementing >>> priority inheritance (which causes troubles with realtime workloads). >>> >>> Convert percpu_cpuset_rwsem back to regular cpuset_mutex. Also grab it >>> only for SCHED_DEADLINE tasks (other policies don't care about stable >>> cpusets anyway). >>> >>> Signed-off-by: Juri Lelli >> I am thinking that maybe we should switch the percpu rwsem to a regular >> rwsem as there are cases where a read lock is sufficient. This will also >> avoid the potential PREEMPT_RT problem with PI and reduce the time it needs >> to take a write lock. > I'm not a big fan of rwsems for reasons like > https://lore.kernel.org/lkml/20230321161140.HMcQEhHb@linutronix.de/, so > I'd vote for a standard mutex unless we have a strong argument and/or > numbers. +1 -- Daniel