From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juri Lelli Subject: Re: [PATCH 2/6] sched/cpuset: Bring back cpuset_mutex Date: Wed, 26 Apr 2023 13:57:31 +0200 Message-ID: References: <20230329125558.255239-1-juri.lelli@redhat.com> <20230329125558.255239-3-juri.lelli@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682510257; 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: in-reply-to:in-reply-to:references:references; bh=S6kenneY8yYtvlvRJgCvchvwHXpRVf9tllRS7ez23UU=; b=Y/gms4UmJLai4pwPTAIDfwhzwrC1YnRaa70pMrIDthQMJTtIAIlvBLIsLcixb4TNTNNubK 7FLSzebblPBzjjASQ/LTU7qLyIu075ZyKbC779KF8JJg7VLOYXzJYxCJCnB5oYpL0DHnTr 5f9St1J/ldW8APCHQZMtJkqEscEolNM= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Qais Yousef , Tejun Heo , Zefan Li , Johannes Weiner , Hao Luo , Dietmar Eggemann , Steven Rostedt , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, luca.abeni-5rdYK369eBLQB0XuIGIEkQ@public.gmane.org, claudio-YOzL5CV4y4YG1A2ADO40+w@public.gmane.org, tommaso.cucinotta-5rdYK369eBLQB0XuIGIEkQ@public.gmane.org, bristot-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Vincent Guittot , Wei Wang , Rick Yiu , Quentin Perret , Heiko Carstens , Vasily Gorbik , Alexander Gordeev 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-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org/, so I'd vote for a standard mutex unless we have a strong argument and/or numbers. Thanks! Juri