Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp864385rwr; Wed, 26 Apr 2023 07:19:09 -0700 (PDT) X-Google-Smtp-Source: AKy350bsmCJo7saRWfClTFhLdTdN9VeLIPFsZgdc0q4yLK/Vx8VjkCC+a63ThKKRjGPtxroF/nAA X-Received: by 2002:a05:6a20:1605:b0:f5:e4b0:4221 with SMTP id l5-20020a056a20160500b000f5e4b04221mr10280878pzj.56.1682518749389; Wed, 26 Apr 2023 07:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682518749; cv=none; d=google.com; s=arc-20160816; b=Qv7u9OYmmbKYDIzAPykf7/dnJTsp2hbRuUew5cHLP/SCMogJ1zuBcXPosWVArK/Id/ dxUSAqCedtNX7+wPOFwm7+vaZyP07hJHsqFGsHeM/AKSUrMkR9AauElYysRz+4nDg2u6 L1uFV6Rkl3/gZFDHbLzLl6m77QcALAtVPrgMHAfUEaYdHSIQ+kfEtLmstaJ49PGZFCkf jqOUcIyVc2BLxYR99lnQFrPJA1YWUDtCU9tWEL5O4puSoSU8Si2BebBAweJN+P1aLDqh 4eXd/kGJKsxC92TMA4hdwAgbl9ebyYNdd4CSHxneTo1AAChAKATqXA/dU8JYZ4Mzwqpn fEsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Rf30qPmkXFyg0eo0/oPK9xXJTsxFmQ7zB528P1kEZb8=; b=yJToM9WpWJOdHGA4TAfUPmok6ZqTUbQ7fiUhYrMNYbr9YJsTwof5ieFWZJorhtpfKI auARFNIUoe8+DGYxL7GJIsHeq08h6mIvCYo6peo1vEWcbPThJgMY8dH+nRQ07dHT6njU WYCGxn3oKQPN5dDQaCR6yrBqBIY2/qkPzuMZ/8kO7mDK/l8h6fNKMOAX/v6YxFB3zYKH Y9houLm4KHIwgxCHYARe2aMy5UaX8mXTucfYB7h7d4Olvnn6Yqio06CyL8tME0uK1wvC AueZqMkIxU6oslOickaFpQAmEyLer81j5oaEwXupro4OFmYQvJQWQ5sqfkXmjLHQyHui qNuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Rbzn3I7M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020aa79d8b000000b0063b88d64e0bsi16058464pfq.77.2023.04.26.07.18.27; Wed, 26 Apr 2023 07:19:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Rbzn3I7M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241271AbjDZOOp (ORCPT + 99 others); Wed, 26 Apr 2023 10:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241274AbjDZOOl (ORCPT ); Wed, 26 Apr 2023 10:14:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A5DF6EA1 for ; Wed, 26 Apr 2023 07:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682518432; 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=Rf30qPmkXFyg0eo0/oPK9xXJTsxFmQ7zB528P1kEZb8=; b=Rbzn3I7M0p9mLq/wL93Ea/yQphwMjqY5+XjdqPEwXvaQla6N17LyhMZC6dPdGbd09YORV7 uvwOatKSakbSsvg3lgt11fPBM5xduzDB03K/1TOaN9LFOHREmGceKb2kKORajsIecfO1fp xUhEEwXiOsRGj30wqjBHr8YtNliHyXw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-35-EsePhSkiP9mKEUg0iLPFVQ-1; Wed, 26 Apr 2023 10:09:45 -0400 X-MC-Unique: EsePhSkiP9mKEUg0iLPFVQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 79E5A3815EED; Wed, 26 Apr 2023 14:05:51 +0000 (UTC) Received: from [10.22.18.92] (unknown [10.22.18.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF52A40C2020; Wed, 26 Apr 2023 14:05:49 +0000 (UTC) Message-ID: Date: Wed, 26 Apr 2023 10:05:49 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 2/6] sched/cpuset: Bring back cpuset_mutex Content-Language: en-US To: Juri Lelli 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, bristot@redhat.com, mathieu.poirier@linaro.org, cgroups@vger.kernel.org, Vincent Guittot , Wei Wang , Rick Yiu , Quentin Perret , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sudeep Holla References: <20230329125558.255239-1-juri.lelli@redhat.com> <20230329125558.255239-3-juri.lelli@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/26/23 07: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. That is fine for me too. Cheers, Longman