From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79423C7618E for ; Wed, 26 Apr 2023 11:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240711AbjDZL62 (ORCPT ); Wed, 26 Apr 2023 07:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240720AbjDZL6X (ORCPT ); Wed, 26 Apr 2023 07:58:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3162A49E1 for ; Wed, 26 Apr 2023 04:57:38 -0700 (PDT) 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= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-HwsPzAuEMMCMLXVxy_a1NA-1; Wed, 26 Apr 2023 07:57:35 -0400 X-MC-Unique: HwsPzAuEMMCMLXVxy_a1NA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f080f9ea3eso26713585e9.1 for ; Wed, 26 Apr 2023 04:57:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682510255; x=1685102255; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=S6kenneY8yYtvlvRJgCvchvwHXpRVf9tllRS7ez23UU=; b=I8TcMtnMtZSVXRHKU1xosji0ePM2jHJZGjz2XIFL53yDhLIPuiTZXxqRJvi87qunrN 6iX4q1XzYq9YNFmKb0e+CNwwTZf+xvdAqQt7BiVmDn2p37B17gNE4R/37kIvOMv/bYVL SOMs3vVOCR+emCc/HQ+rRmMef6c9Ee5/dnWAOYj5P32StpjmY16PcdfyBO2lSFGI1l74 kmSYrboHPAfGVlQ1YvqJdZ9mO87WDu4H+39qfQHIN/0m/NMg8KxQ7EC34m26f+dgAd0e 17y2Va4bTq1+wGau4NKG7sLXpsmmOLxNqpqCRWK4nE8kWqNFXdJRBMdOuNeyu2rS+opy Uzzw== X-Gm-Message-State: AAQBX9cJhf6fCD44dq7ELOf9Va2Q+KKjSdCSL6iWt3j+XIyLfz3bN3vG juugUV2//abKsDXy8tPQLWEheeJ39A6vIHRv6rWcc17zoF0JSRvT18tr0jgHFy93yAZlB7Iiw6w 1zhHWrjXjwEUJqP2Y1orusMei X-Received: by 2002:a1c:7211:0:b0:3f1:82d8:8fde with SMTP id n17-20020a1c7211000000b003f182d88fdemr12252876wmc.24.1682510254788; Wed, 26 Apr 2023 04:57:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZOmeLFYcmstNxqt1xjWV1KznYWVrdJf5TPMIQkF5eKtyG7qBxSJhOp6nb0xf7u++jM0zEkCw== X-Received: by 2002:a1c:7211:0:b0:3f1:82d8:8fde with SMTP id n17-20020a1c7211000000b003f182d88fdemr12252841wmc.24.1682510254457; Wed, 26 Apr 2023 04:57:34 -0700 (PDT) Received: from localhost.localdomain ([176.206.13.250]) by smtp.gmail.com with ESMTPSA id q17-20020a1cf311000000b003eeb1d6a470sm17806976wmq.13.2023.04.26.04.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 04:57:33 -0700 (PDT) Date: Wed, 26 Apr 2023 13:57:31 +0200 From: Juri Lelli To: 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, 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 Subject: Re: [PATCH 2/6] sched/cpuset: Bring back cpuset_mutex Message-ID: References: <20230329125558.255239-1-juri.lelli@redhat.com> <20230329125558.255239-3-juri.lelli@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks! Juri