Message ID | 20221013184028.129486-3-leobras@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp429998wrs; Thu, 13 Oct 2022 11:55:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4xG49tcACbupfhHSjp0XrCVYIEiax1vwdlVT4HIzXOCAAV5uGhg7tQpLnkijOr9jTB6KzT X-Received: by 2002:a17:903:48e:b0:17f:802b:f079 with SMTP id jj14-20020a170903048e00b0017f802bf079mr1352652plb.89.1665687355800; Thu, 13 Oct 2022 11:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665687355; cv=none; d=google.com; s=arc-20160816; b=NWrNOwu3ikz//L/RU5TFV5C2+51+WIo8857r9Qs3EcBpUvoFc9VozCwVvWr6pEahQk 8mld5u7RewNYe7v3Qns7/OUFh6YMk+MpYUiOEEdciYSRT8+5wWqVIxEaupnXBsiTlrW3 cUQ1EvYi8lOf3ImJwoitjn2eqW8+752abSk1nANJT0rv0/TNqkzpYQDzB0Ow1OgKhjhr wQLaNMJ8oWDCnnLhV9ZXAfMGVrEgg3UpKJBGc2eKH+OFYp13SGkMmIGBFoDNnIA9oggj GDgmV+GM740EIeOPKr92ulVx47fTNwFbOlsJg5zaUBEehmSHg76Ush+cgVEzUhfJylA1 knBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6JjDK3twE+pSMUDp2i+4iId8FgNp8eHanR+PXksbbJA=; b=QOhQmLqkarZnQcSm/ANiYCYSsyxrUjbPgYOw86S7iKqt129ugjFt9A6BMMGutNaSo8 YqaSgZuqI1q2XDEVRN8E3vl47LX+7aqo8CWiWdOmnQRWZGnQwHyN2HDWGAWT0sPN6y9G qGVMvjvwzs4gQwtVxDLTiQ+NrojwqKTYZPS3lTha/wzjCftrK1jpZZ+KHKFFyp4kVfV3 L1eWmi58/sCY65aY3PB6Vltjhnm4Uwq4odwAX4oKqUI6Ue+457vmbcCxaiDZFbrN29Gk scqpYjhJc3bSEXGrpUj/zRJl98rnIMpESGGCnZRibVGcptXafQP0J3ujDnT69cNhYn4/ AIvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PmgopVZ4; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a639343000000b00452bab4de6fsi83250pgm.749.2022.10.13.11.55.42; Thu, 13 Oct 2022 11:55:55 -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=PmgopVZ4; 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 S230471AbiJMSpi (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 13 Oct 2022 14:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbiJMSoE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Oct 2022 14:44:04 -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 6810C2B601 for <linux-kernel@vger.kernel.org>; Thu, 13 Oct 2022 11:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665686464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6JjDK3twE+pSMUDp2i+4iId8FgNp8eHanR+PXksbbJA=; b=PmgopVZ4uhKK4wWaSfryKMT76m03M070tT68+3KxMtDYn0HuT9mq5hjrPHBa1RMrWMfh/G Y/84zmWGDccMZD8uXk3ThcS5Z4uEnNVt7VjvoEB1KcZbPJc0Bp4M5+zJgzWiedWNwRjQ0S LKsEnPaNhFQsa+GYeWFNxcHm9Pnc/V4= Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-331-3l9a5KStOp6pNqlx61X7Vw-1; Thu, 13 Oct 2022 14:41:03 -0400 X-MC-Unique: 3l9a5KStOp6pNqlx61X7Vw-1 Received: by mail-oo1-f70.google.com with SMTP id n5-20020a4a3445000000b004728fe7a331so1267361oof.23 for <linux-kernel@vger.kernel.org>; Thu, 13 Oct 2022 11:41:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6JjDK3twE+pSMUDp2i+4iId8FgNp8eHanR+PXksbbJA=; b=pAj0vEImqIQyGigHfnDg8Xr0V16uDz3Rtc0U70lDMkULng4RBXhRgg9/NPVrQhcn+i isMZC1UQGxVqnms6THGEZdJT+XoZptMl7ejErMmGreSlS89zyx0mWtSycSk9fsLWLHxy ZSdlRp/9SmX8gKqb/BsLcCA3JPbJRnPRYm2BEXYBX7glmndIumRFBjXTrq2LAtfE4+2N zeUmaDS+sm1ERHFqO4oFTGykyKevu7uFNrd4HUoKPMW6VNZOeB7PSKBxO2p20N7oQxq2 c2exS4CwrL8eCUo2kNnRpNzbLfZA3sBbgCrrsodxkVnX8x+a+zsSIh5Kyjvxzb2ySdRI HY7A== X-Gm-Message-State: ACrzQf1PN9sSyG3WHY0jgrFQsL/4tnAB3O6wCcCe9ZpJZ1cy5xiKOBgs 3LNLFVurqbQfDMPVf7drQroBJi5WFs9SoiVeH7CFbjKNQtLlRy9IMUdFtSxr2uBIn3L3k9RSh1r ht7JfGpzTx6P6XwTGCyrbt7Mm X-Received: by 2002:a9d:2d81:0:b0:658:accf:2adf with SMTP id g1-20020a9d2d81000000b00658accf2adfmr688467otb.334.1665686462129; Thu, 13 Oct 2022 11:41:02 -0700 (PDT) X-Received: by 2002:a9d:2d81:0:b0:658:accf:2adf with SMTP id g1-20020a9d2d81000000b00658accf2adfmr688432otb.334.1665686461891; Thu, 13 Oct 2022 11:41:01 -0700 (PDT) Received: from localhost.localdomain ([2804:1b3:a801:9473:d360:c737:7c9c:d52b]) by smtp.gmail.com with ESMTPSA id v13-20020a05683024ad00b006618ad77a63sm244521ots.74.2022.10.13.11.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 11:41:01 -0700 (PDT) From: Leonardo Bras <leobras@redhat.com> To: Steffen Klassert <steffen.klassert@secunet.com>, Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, Bjorn Helgaas <bhelgaas@google.com>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Steven Rostedt <rostedt@goodmis.org>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, Daniel Bristot de Oliveira <bristot@redhat.com>, Valentin Schneider <vschneid@redhat.com>, Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Leonardo Bras <leobras@redhat.com>, Frederic Weisbecker <frederic@kernel.org>, Phil Auld <pauld@redhat.com>, Antoine Tenart <atenart@kernel.org>, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Wang Yufen <wangyufen@huawei.com>, mtosatti@redhat.com Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 2/4] sched/isolation: Improve documentation Date: Thu, 13 Oct 2022 15:40:27 -0300 Message-Id: <20221013184028.129486-3-leobras@redhat.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221013184028.129486-1-leobras@redhat.com> References: <20221013184028.129486-1-leobras@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746599784512565726?= X-GMAIL-MSGID: =?utf-8?q?1746599784512565726?= |
Series | CPU isolation improvements | |
Commit Message
Leonardo Bras Soares Passos
Oct. 13, 2022, 6:40 p.m. UTC
Improve documentation on housekeeping types and what to expect from
housekeeping functions.
Signed-off-by: Leonardo Bras <leobras@redhat.com>
---
include/linux/sched/isolation.h | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
Comments
On Thu, Oct 13, 2022 at 03:40:27PM -0300, Leonardo Bras wrote: > +/* Kernel parameters like nohz_full and isolcpus allow passing cpu numbers > + * for disabling housekeeping types. > + * > + * The functions bellow work the opposite way, by referencing which cpus > + * are able to perform the housekeeping type in parameter. > + */ So checkpatch should have bitten your head off for this drug-indiced comment style :-) https://lore.kernel.org/all/CA+55aFyQYJerovMsSoSKS7PessZBr4vNp-3QUUwhqk4A4_jcbg@mail.gmail.com/
On Fri, Oct 14, 2022 at 6:03 AM Peter Zijlstra <peterz@infradead.org> wrote: > > On Thu, Oct 13, 2022 at 03:40:27PM -0300, Leonardo Bras wrote: > > > +/* Kernel parameters like nohz_full and isolcpus allow passing cpu numbers > > + * for disabling housekeeping types. > > + * > > + * The functions bellow work the opposite way, by referencing which cpus > > + * are able to perform the housekeeping type in parameter. > > + */ > > So checkpatch should have bitten your head off for this drug-indiced > comment style :-) Oh, my bad on this one, I will fix that now. > > https://lore.kernel.org/all/CA+55aFyQYJerovMsSoSKS7PessZBr4vNp-3QUUwhqk4A4_jcbg@mail.gmail.com/ > Any comments in the text? Is that correct? Thanks for the feedback! Best regards, Leo
On Thu, Oct 13, 2022 at 03:40:27PM -0300, Leonardo Bras wrote: > Improve documentation on housekeeping types and what to expect from > housekeeping functions. > > Signed-off-by: Leonardo Bras <leobras@redhat.com> > --- > include/linux/sched/isolation.h | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h > index 762701f295d1c..9333c28153a7a 100644 > --- a/include/linux/sched/isolation.h > +++ b/include/linux/sched/isolation.h > @@ -7,18 +7,25 @@ > #include <linux/tick.h> > > enum hk_type { > - HK_TYPE_TIMER, > - HK_TYPE_RCU, > - HK_TYPE_MISC, > - HK_TYPE_SCHED, > - HK_TYPE_TICK, > - HK_TYPE_DOMAIN, > - HK_TYPE_WQ, > - HK_TYPE_MANAGED_IRQ, > - HK_TYPE_KTHREAD, > + HK_TYPE_TIMER, /* Timer interrupt, watchdogs */ More precisely: /* Unbound timer callbacks */ > + HK_TYPE_RCU, /* RCU callbacks */ More generally, because it's more than just about callbacks: /* Unbound RCU work */ > + HK_TYPE_MISC, /* Minor housekeeping categories */ > + HK_TYPE_SCHED, /* Scheduling and idle load balancing */ > + HK_TYPE_TICK, /* See isolcpus=nohz boot parameter */ Yes or nohz_full= > + HK_TYPE_DOMAIN, /* See isolcpus=domain boot parameter*/ > + HK_TYPE_WQ, /* Work Queues*/ /* Unbound workqueues */ > + HK_TYPE_MANAGED_IRQ, /* See isolcpus=managed_irq boot parameter */ > + HK_TYPE_KTHREAD, /* kernel threads */ /* Unbound kernel threads */ > HK_TYPE_MAX > }; > > +/* Kernel parameters like nohz_full and isolcpus allow passing cpu numbers > + * for disabling housekeeping types. > + * > + * The functions bellow work the opposite way, by referencing which cpus > + * are able to perform the housekeeping type in parameter. > + */ *below Thanks! > + > #ifdef CONFIG_CPU_ISOLATION > DECLARE_STATIC_KEY_FALSE(housekeeping_overridden); > int housekeeping_any_cpu(enum hk_type type); > -- > 2.38.0 >
On Tue, 2022-11-29 at 12:54 +0100, Frederic Weisbecker wrote: > On Thu, Oct 13, 2022 at 03:40:27PM -0300, Leonardo Bras wrote: > > Improve documentation on housekeeping types and what to expect from > > housekeeping functions. > > > > Signed-off-by: Leonardo Bras <leobras@redhat.com> > > --- > > include/linux/sched/isolation.h | 25 ++++++++++++++++--------- > > 1 file changed, 16 insertions(+), 9 deletions(-) > > > > diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h > > index 762701f295d1c..9333c28153a7a 100644 > > --- a/include/linux/sched/isolation.h > > +++ b/include/linux/sched/isolation.h > > @@ -7,18 +7,25 @@ > > #include <linux/tick.h> > > > > enum hk_type { > > - HK_TYPE_TIMER, > > - HK_TYPE_RCU, > > - HK_TYPE_MISC, > > - HK_TYPE_SCHED, > > - HK_TYPE_TICK, > > - HK_TYPE_DOMAIN, > > - HK_TYPE_WQ, > > - HK_TYPE_MANAGED_IRQ, > > - HK_TYPE_KTHREAD, > > + HK_TYPE_TIMER, /* Timer interrupt, watchdogs */ > > More precisely: > > /* Unbound timer callbacks */ > > > + HK_TYPE_RCU, /* RCU callbacks */ > > More generally, because it's more than just about callbacks: > > /* Unbound RCU work */ Both updated, thanks! Out of curiosity, what does 'Unbound' means in this context? > > > + HK_TYPE_MISC, /* Minor housekeeping categories */ > > + HK_TYPE_SCHED, /* Scheduling and idle load balancing */ > > + HK_TYPE_TICK, /* See isolcpus=nohz boot parameter */ > > Yes or nohz_full= > > > + HK_TYPE_DOMAIN, /* See isolcpus=domain boot parameter*/ > > + HK_TYPE_WQ, /* Work Queues*/ > > /* Unbound workqueues */ > > > + HK_TYPE_MANAGED_IRQ, /* See isolcpus=managed_irq boot parameter */ > > + HK_TYPE_KTHREAD, /* kernel threads */ > > /* Unbound kernel threads */ > > > > HK_TYPE_MAX > > }; > > > > +/* Kernel parameters like nohz_full and isolcpus allow passing cpu numbers > > + * for disabling housekeeping types. > > + * > > + * The functions bellow work the opposite way, by referencing which cpus > > + * are able to perform the housekeeping type in parameter. > > + */ > > *below > > Thanks! Done, done, done, done. Thanks a lot for reviewing! Best regards, Leo > > > + > > #ifdef CONFIG_CPU_ISOLATION > > DECLARE_STATIC_KEY_FALSE(housekeeping_overridden); > > int housekeeping_any_cpu(enum hk_type type); > > -- > > 2.38.0 > > >
diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h index 762701f295d1c..9333c28153a7a 100644 --- a/include/linux/sched/isolation.h +++ b/include/linux/sched/isolation.h @@ -7,18 +7,25 @@ #include <linux/tick.h> enum hk_type { - HK_TYPE_TIMER, - HK_TYPE_RCU, - HK_TYPE_MISC, - HK_TYPE_SCHED, - HK_TYPE_TICK, - HK_TYPE_DOMAIN, - HK_TYPE_WQ, - HK_TYPE_MANAGED_IRQ, - HK_TYPE_KTHREAD, + HK_TYPE_TIMER, /* Timer interrupt, watchdogs */ + HK_TYPE_RCU, /* RCU callbacks */ + HK_TYPE_MISC, /* Minor housekeeping categories */ + HK_TYPE_SCHED, /* Scheduling and idle load balancing */ + HK_TYPE_TICK, /* See isolcpus=nohz boot parameter */ + HK_TYPE_DOMAIN, /* See isolcpus=domain boot parameter*/ + HK_TYPE_WQ, /* Work Queues*/ + HK_TYPE_MANAGED_IRQ, /* See isolcpus=managed_irq boot parameter */ + HK_TYPE_KTHREAD, /* kernel threads */ HK_TYPE_MAX }; +/* Kernel parameters like nohz_full and isolcpus allow passing cpu numbers + * for disabling housekeeping types. + * + * The functions bellow work the opposite way, by referencing which cpus + * are able to perform the housekeeping type in parameter. + */ + #ifdef CONFIG_CPU_ISOLATION DECLARE_STATIC_KEY_FALSE(housekeeping_overridden); int housekeeping_any_cpu(enum hk_type type);