Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp710994rwb; Tue, 29 Nov 2022 04:31:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf4fUih8+m/8GDeAhCJ5ywtJ6GKOh2kRkn/IjHseLRQUxT6enJCNT1isxXYJokAvyDISC39S X-Received: by 2002:a17:90a:458a:b0:214:166e:e202 with SMTP id v10-20020a17090a458a00b00214166ee202mr60219935pjg.165.1669725091936; Tue, 29 Nov 2022 04:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669725091; cv=none; d=google.com; s=arc-20160816; b=puHrxmW3BLSvX7iWyCRrEcXbBSMBpf+d3g0hAdICtu57bvrG4JrXgE2fyRLmHshrgj SrF0qTYG7CDZnXwY0ZZMBJanZ41mWOF+HOD4tr39idYlF0pGiFy5eEfucgB0ZYKhy/Lt QKxH2qDoAvjQWsFKxxXgZ5+XHs5hgNfuel9Nr9Je2qiafaXN/9sKiJD6SFalVfZPSbiJ 5dvC/JQiP7nA/UpP4kFN7SfQzHGHw8DdOYVlIQUfyCJtKdVDVNQ6qRWYSAPrYWpH8hOW l1pBk1Zq6mDwozwvXV3Evdc3oC6zsMnDS+rtjHJesZW/nWyXHtVPh86plgjhRK6Fnk1H 3tmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fal856iELaugPGYST128567Z3aBb+YCYQJjTjt11UlY=; b=grwslKMQI2RKZVF5M0MkVlnls+r9pMoV4nfmJLFnFgIOAE4rjlKo8y+zVYv8UtZw8F QgZvdCpFlV71JAt2yWHW6mlSdiyRyNWfeDfAQdGJ65DaMKLGxXVX+xDGUtoIcjATfUJK 5Db+roGqZxIdokGINEvuQyyjE5kDdvOeY4yV4hHSYkfGoHwbQxO92sBk6W+klsbm+t4U 7ap6F79Z9+tTjSMmaSLs3NUlzTPk2/h1eSA45eeyRznEIuRXa1qYtMrgSslLUFRPrQta gNx5WPtQYQrg4/LqBp6FqVldrr2ek5F+nsO+L25RPV965Zpr9l2y+TGZM9f2bA0Giu8F brhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mj9ZmH+0; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw14-20020a17090b180e00b00213193e7047si1691601pjb.185.2022.11.29.04.31.20; Tue, 29 Nov 2022 04:31:31 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=Mj9ZmH+0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233500AbiK2MLA (ORCPT + 83 others); Tue, 29 Nov 2022 07:11:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbiK2MK5 (ORCPT ); Tue, 29 Nov 2022 07:10:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EDE52AA; Tue, 29 Nov 2022 04:10:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 149A2616E7; Tue, 29 Nov 2022 12:10:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5620C433C1; Tue, 29 Nov 2022 12:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669723854; bh=eK3eWs+NakxQYgxM//BYeenp/ALFDb+g86OEaVascqA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mj9ZmH+0V4LM3h58rvnCrwkPwoNhBo15JZD1/1Iz69v9Lj9WG6c/AHd+QdyoeJejU zIrRCRdAkXPE+zwUaCaljzQQaDnVSY6hJBzRKgF0l+odTrUClVF70Q2k3IMFHCIABA OKNzfNzjsjljqey3uq0OG7mGEagNWoQwXBIDKxF+56OfscLPE8vGF19ucITk7/grMY 27rEr8kDWOnErW7KHhTC40hDmaWu0O8JMwMvZmeopHDc8cpB/AzHrDsdxX9pXG6cWH E+uUwAkoMZruyrBVCDkaEyq5yOGtdJHP7G9220yLf12RMS9hVVMjahnQLO8lkTkTcs KtdCPp0bVvB6Q== Date: Tue, 29 Nov 2022 13:10:51 +0100 From: Frederic Weisbecker To: Leonardo =?iso-8859-1?Q?Br=E1s?= Cc: Peter Zijlstra , Steffen Klassert , Herbert Xu , "David S. Miller" , Bjorn Helgaas , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Tejun Heo , Lai Jiangshan , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Phil Auld , Antoine Tenart , Christophe JAILLET , Wang Yufen , mtosatti@redhat.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, netdev@vger.kernel.org, fweisbec@gmail.com Subject: Re: [PATCH v2 3/4] sched/isolation: Add HK_TYPE_WQ to isolcpus=domain Message-ID: <20221129121051.GB1715045@lothringen> References: <20221013184028.129486-1-leobras@redhat.com> <20221013184028.129486-4-leobras@redhat.com> <20221014132410.GA1108603@lothringen> <7249d33e5b3e7d63b1b2a0df2b43e7a6f2082cf9.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7249d33e5b3e7d63b1b2a0df2b43e7a6f2082cf9.camel@redhat.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Fri, Oct 14, 2022 at 01:27:25PM -0300, Leonardo Br?s wrote: > Hello Frederic, > > So, IIUC you are removing all flags composing nohz_full= parameter in favor of a > unified NOHZ_FULL flag. > > I am very new to the code, and I am probably missing the whole picture, but I > actually think it's a good approach to keep them split for a couple reasons: > 1 - They are easier to understand in code (IMHO):? > "This cpu should not do this, because it's not able to do WQ housekeeping" looks > better than "because it's not in DOMAIN or NOHZ_FULL housekeeping" A comment above each site may solve that. > > 2 - They are simpler for using:? > Suppose we have this function that should run at a WQ, but we want to keep them > out of the isolated cpus. If we have the unified flags, we need to combine both > DOMAIN and NOHZ_FULL bitmasks, and then combine it again with something like > cpu_online_mask. It usually means allocating a new cpumask_t, and also freeing > it afterwards. > If we have a single WQ flag, we can avoid the allocation altogether by using > for_each_cpu_and(), making the code much simpler. I guess having a specific function for workqueues would arrange for it. > > 3 - It makes easier to compose new isolation modes: > In case the future requires a new isolation mode that also uses the types of > isolation we currently have implemented, it would be much easier to just compose > it with the current HK flags, instead of having to go through all usages and do > a cpumask_and() there. Also, new isolation modes would make (2) worse. Actually having a new feature merged in HK_NOHZ_FULL would make it easier to handle as it avoids spreading cpumasks. I'm not sure I understand what you mean. Thanks.