Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5728310pxv; Wed, 21 Jul 2021 12:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7Q+0GG84h3NkTUYIUXfbkWPFchMnUhl8SpoXpY+F88G21lSpCfW/jcF6m9BGUvxr6XoZA X-Received: by 2002:a5e:9309:: with SMTP id k9mr27334351iom.207.1626895611199; Wed, 21 Jul 2021 12:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626895611; cv=none; d=google.com; s=arc-20160816; b=q0uF8tR9/Yidy76SS0CMPrKkjbAVgosTRtDwrr1NqD20cYpUycUDhOQHZFAHhexgTq 5jZiPsEsGtUej+Sg+7O0kPxRMrkzZI1+JbLet/oGWqzqUh8qDIg4XT48YzBY5d/bHUIq T5q+p7gGyZwDG4gwRccptyTpbmfM0u87S6fumCM5R33cMxs4h7NZOBEY4tSp4D9PwCW6 XekWdvQGOH1eSN3FjMXPQN2+W3omUMKvvckOT2uuvtZGLikn/dqn105pvFiR8TdpNIbc jPiaQoJ62Sz3W3qL5yu+/BSuS/sVPcRSmpIfN6OQre+yZZq+qIn+C/R+JC06nktSHu7N NorA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=A+8TraJgRMBfKteaq+pAJUDxOoHn3L2IK5ZiBLNiMA0=; b=0lGuMF4Zw0DxzZoBfNq6TeDJoC0vhFyPuQpdKZfy00dDuOlfPdfQARFjxH9hhl6yfm h63k3uk2bKrjIgqXrPybOODAEyBv8MvTSPY94Mx9pDtGZ+ldp7pxpn3ni6Nj7t5VVc0D h/LqTOwN2H5NNICbKyxOvRgOx5aNedc5gKmdsJBUBcAcIq7Z4jSm5+Az4l3vNj8MDGOQ rzJHfvhciuLaSQMa2m0x8poUfCtEAYWLRXDQgQSzorN7t0bgUy14Z8W+7TREIa6lMJNt N74ZOLHXDDw0pduTQp5c4d4hBEegHl/pKmLCMy0nmvuX9aGMfzazIwsCTGpW1vbQ62pH pwIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si29454493ilu.68.2021.07.21.12.26.39; Wed, 21 Jul 2021 12:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238005AbhGUNsQ (ORCPT + 99 others); Wed, 21 Jul 2021 09:48:16 -0400 Received: from foss.arm.com ([217.140.110.172]:55980 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235762AbhGUNsQ (ORCPT ); Wed, 21 Jul 2021 09:48:16 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9A15331B; Wed, 21 Jul 2021 07:28:52 -0700 (PDT) Received: from e120877-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EC7453F73D; Wed, 21 Jul 2021 07:28:50 -0700 (PDT) Date: Wed, 21 Jul 2021 15:28:45 +0100 From: Vincent Donnefort To: Frederic Weisbecker Cc: LKML , Tejun Heo , Peter Zijlstra , Juri Lelli , Alex Belits , Nitesh Lal , Thomas Gleixner , Nicolas Saenz , Christoph Lameter , Marcelo Tosatti , Zefan Li , cgroups@vger.kernel.org Subject: Re: [RFC PATCH 5/6] sched/isolation: Make HK_FLAG_DOMAIN mutable Message-ID: <20210721142726.GA206211@e120877-lin.cambridge.arm.com> References: <20210714135420.69624-1-frederic@kernel.org> <20210714135420.69624-6-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210714135420.69624-6-frederic@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frederic, [...] > > +// Only support HK_FLAG_DOMAIN for now > +// TODO: propagate the changes through all interested subsystems: > +// workqueues, net, pci; ... > +void housekeeping_cpumask_set(struct cpumask *mask, enum hk_flags flags) > +{ > + /* Only HK_FLAG_DOMAIN change supported for now */ > + if (WARN_ON_ONCE(flags != HK_FLAG_DOMAIN)) > + return; > > + if (!static_key_enabled(&housekeeping_overridden.key)) { > + if (cpumask_equal(mask, cpu_possible_mask)) > + return; > + if (WARN_ON_ONCE(!alloc_cpumask_var(&hk_domain_mask, GFP_KERNEL))) > + return; > + cpumask_copy(hk_domain_mask, mask); > + static_branch_enable(&housekeeping_overridden); I get a warning here. static_branch_enable() is trying to take cpus_read_lock(). But the same lock is already taken by cpuset_write_u64(). Also, shouldn't it set HK_FLAG_DOMAIN in housekeeping_flags to enable housekeeping if the kernel started without isolcpus="" ? -- Vincent