From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: Re: [PATCH 2/6] sched/cpuset: Bring back cpuset_mutex Date: Tue, 4 Apr 2023 13:31:51 -0400 Message-ID: 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=1680629519; 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=V+vrMacm8K2usa1pALZTH2tABjT2c2JpiiWSHS5nyhs=; b=DbQdzu42OJJZmcFOsAA6PHSpRxoVM0I1ztHE2bhalS5wc8XK3TWv97x2iGaLawEHeOO4Tm YJGCWCAVd3hPQH09nHtfwNEHZSO9ITQbgVR8sen/l3MF1gzYhnmGUSrzW7wo9xmNIfpxTL sstBD+kmBl08P5KgVDVDK3WYhtiOaVc= Content-Language: en-US In-Reply-To: <20230329125558.255239-3-juri.lelli-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Juri Lelli , Peter Zijlstra , Ingo Molnar , Qais Yousef , Tejun Heo , Zefan Li , Johannes Weiner , Hao Luo Cc: 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 , Sudeep Holla 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. Cheers, Longman