Message ID | 20230522092141.124290-1-hsiangkao@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1317510vqo; Mon, 22 May 2023 02:32:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ZvRVqzYHir7hXXayfvwpMTUsnOlZWMQsoih8HmWFFA2v5CC6CtjKviMtjVXUlX8vyBiG5 X-Received: by 2002:a17:903:456:b0:1af:9b8a:9c79 with SMTP id iw22-20020a170903045600b001af9b8a9c79mr5812728plb.34.1684747950109; Mon, 22 May 2023 02:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684747950; cv=none; d=google.com; s=arc-20160816; b=pC8KIjewIUr7UfQR77cEIeO+EteURAP5x/RxR7bpuO7Hs+RIwpByY5iL3hkuSdtS+p jtK1OEcHbYFO1+of0aLtXkP09lSONM65WhVt3YC7yNexOg+rDSXvNJe88Byh4ihRpyYs 8wbMCEAS0Ms1GkucaVxqnlIXXmb4eKru8V891FV04hufDEAjvX73uVCJsnCHOng7J3UH fegoNInr4pdXWkl7T1bxXKe3JTvHVPS8D5Dk85Uorz2p6bFQVBAXyxOLxNuQm9QIOvoS DJ2w3yGPRClcqRkONqV9QQVK64PKlW6QlkA7o4kxeySMEBmGqlYn8FwPo47imWIKMczp f9LA== 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 :message-id:date:subject:cc:to:from; bh=7Ok4Z+9Z0Rv0jUp5Qn6mkbcGDrgfqvj0zWT0ZoKH/7g=; b=qqQfGdec4QMh5Kn76VEc+Z49e14aImjVdRLjNEZo22T3Nm0NUUiA7sI8V3SwmJB1R5 VnmvVS/KFjIIQO6R23NqJ4X3KAu/BmRKF+IKU9Ywp0biELtCF/dhRnq/kfNim+6WAn5C LPj1rYS9rOaNMgkj+ie7Cekf8kS+KxHJbZua9bGJKaRtuimZB1eJ1EAJLn56YuZ7i4nG G6+Oj765wBPTxrG6sTI0Ur2zPlxckbpAd1+9Ccp70W7c1csvaIm69Kz/NjFnPR9RJDab G34R5dxt5JanBsPa92YDGx7PzocQNveTHuLVll8othocGRWTC88qOHfI9ZiP/mOz9L0u 2png== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a170902b28400b001adc74c482asi3699128plr.151.2023.05.22.02.32.17; Mon, 22 May 2023 02:32:30 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232783AbjEVJWB (ORCPT <rfc822;cscallsign@gmail.com> + 99 others); Mon, 22 May 2023 05:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232778AbjEVJV4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 22 May 2023 05:21:56 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D505012B for <linux-kernel@vger.kernel.org>; Mon, 22 May 2023 02:21:49 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R451e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VjCMWO._1684747302; Received: from e18g06460.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VjCMWO._1684747302) by smtp.aliyun-inc.com; Mon, 22 May 2023 17:21:47 +0800 From: Gao Xiang <hsiangkao@linux.alibaba.com> To: linux-erofs@lists.ozlabs.org Cc: LKML <linux-kernel@vger.kernel.org>, Gao Xiang <hsiangkao@linux.alibaba.com>, Sandeep Dhavale <dhavale@google.com> Subject: [PATCH] erofs: use HIPRI by default if per-cpu kthreads are enabled Date: Mon, 22 May 2023 17:21:41 +0800 Message-Id: <20230522092141.124290-1-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.24.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL 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: <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?1766586266667714817?= X-GMAIL-MSGID: =?utf-8?q?1766586266667714817?= |
Series |
erofs: use HIPRI by default if per-cpu kthreads are enabled
|
|
Commit Message
Gao Xiang
May 22, 2023, 9:21 a.m. UTC
As Sandeep shown [1], high priority RT per-cpu kthreads are
typically helpful for Android scenarios to minimize the scheduling
latencies.
Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if
EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for
EROFS_FS_PCPU_KTHREAD.
Also clean up unneeded sched_set_normal().
[1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com
Cc: Sandeep Dhavale <dhavale@google.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
fs/erofs/Kconfig | 1 +
fs/erofs/zdata.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
Comments
On Mon, 22 May 2023 17:21:41 +0800 Gao Xiang <hsiangkao@linux.alibaba.com> wrote: > As Sandeep shown [1], high priority RT per-cpu kthreads are > typically helpful for Android scenarios to minimize the scheduling > latencies. > > Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if > EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for > EROFS_FS_PCPU_KTHREAD. > > Also clean up unneeded sched_set_normal(). > > [1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com > Cc: Sandeep Dhavale <dhavale@google.com> > Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> > --- > fs/erofs/Kconfig | 1 + > fs/erofs/zdata.c | 2 -- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig > index 704fb59577e0..f259d92c9720 100644 > --- a/fs/erofs/Kconfig > +++ b/fs/erofs/Kconfig > @@ -121,6 +121,7 @@ config EROFS_FS_PCPU_KTHREAD > config EROFS_FS_PCPU_KTHREAD_HIPRI > bool "EROFS high priority per-CPU kthread workers" > depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD > + default y How about removing this config option? > help > This permits EROFS to configure per-CPU kthread workers to run > at higher priority. > diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c > index 92f3a01262cf..3ba505434f03 100644 > --- a/fs/erofs/zdata.c > +++ b/fs/erofs/zdata.c > @@ -367,8 +367,6 @@ static struct kthread_worker *erofs_init_percpu_worker(int cpu) > return worker; > if (IS_ENABLED(CONFIG_EROFS_FS_PCPU_KTHREAD_HIPRI)) > sched_set_fifo_low(worker->task); > - else > - sched_set_normal(worker->task, 0); > return worker; > } >
On 2023/5/23 17:52, Yue Hu wrote: > On Mon, 22 May 2023 17:21:41 +0800 > Gao Xiang <hsiangkao@linux.alibaba.com> wrote: > >> As Sandeep shown [1], high priority RT per-cpu kthreads are >> typically helpful for Android scenarios to minimize the scheduling >> latencies. >> >> Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if >> EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for >> EROFS_FS_PCPU_KTHREAD. >> >> Also clean up unneeded sched_set_normal(). >> >> [1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com >> Cc: Sandeep Dhavale <dhavale@google.com> >> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> >> --- >> fs/erofs/Kconfig | 1 + >> fs/erofs/zdata.c | 2 -- >> 2 files changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig >> index 704fb59577e0..f259d92c9720 100644 >> --- a/fs/erofs/Kconfig >> +++ b/fs/erofs/Kconfig >> @@ -121,6 +121,7 @@ config EROFS_FS_PCPU_KTHREAD >> config EROFS_FS_PCPU_KTHREAD_HIPRI >> bool "EROFS high priority per-CPU kthread workers" >> depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD >> + default y > > How about removing this config option? I tend to leave it as is. Thanks, Gao Xiang
On Tue, 23 May 2023 09:53:06 +0800 Gao Xiang <hsiangkao@linux.alibaba.com> wrote: > On 2023/5/23 17:52, Yue Hu wrote: > > On Mon, 22 May 2023 17:21:41 +0800 > > Gao Xiang <hsiangkao@linux.alibaba.com> wrote: > > > >> As Sandeep shown [1], high priority RT per-cpu kthreads are > >> typically helpful for Android scenarios to minimize the scheduling > >> latencies. > >> > >> Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if > >> EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for > >> EROFS_FS_PCPU_KTHREAD. > >> > >> Also clean up unneeded sched_set_normal(). > >> > >> [1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com > >> Cc: Sandeep Dhavale <dhavale@google.com> > >> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> > >> --- > >> fs/erofs/Kconfig | 1 + > >> fs/erofs/zdata.c | 2 -- > >> 2 files changed, 1 insertion(+), 2 deletions(-) > >> > >> diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig > >> index 704fb59577e0..f259d92c9720 100644 > >> --- a/fs/erofs/Kconfig > >> +++ b/fs/erofs/Kconfig > >> @@ -121,6 +121,7 @@ config EROFS_FS_PCPU_KTHREAD > >> config EROFS_FS_PCPU_KTHREAD_HIPRI > >> bool "EROFS high priority per-CPU kthread workers" > >> depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD > >> + default y > > > > How about removing this config option? > > I tend to leave it as is. Okay. Reviewed-by: Yue Hu <huyue2@coolpad.com> > > Thanks, > Gao Xiang
On Mon, May 22, 2023 at 2:21 AM Gao Xiang <hsiangkao@linux.alibaba.com> wrote: > > As Sandeep shown [1], high priority RT per-cpu kthreads are > typically helpful for Android scenarios to minimize the scheduling > latencies. > > Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if > EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for > EROFS_FS_PCPU_KTHREAD. > > Also clean up unneeded sched_set_normal(). > > [1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com > Cc: Sandeep Dhavale <dhavale@google.com> > Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> > --- > fs/erofs/Kconfig | 1 + > fs/erofs/zdata.c | 2 -- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig > index 704fb59577e0..f259d92c9720 100644 > --- a/fs/erofs/Kconfig > +++ b/fs/erofs/Kconfig > @@ -121,6 +121,7 @@ config EROFS_FS_PCPU_KTHREAD > config EROFS_FS_PCPU_KTHREAD_HIPRI > bool "EROFS high priority per-CPU kthread workers" > depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD > + default y > help > This permits EROFS to configure per-CPU kthread workers to run > at higher priority. > diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c > index 92f3a01262cf..3ba505434f03 100644 > --- a/fs/erofs/zdata.c > +++ b/fs/erofs/zdata.c > @@ -367,8 +367,6 @@ static struct kthread_worker *erofs_init_percpu_worker(int cpu) > return worker; > if (IS_ENABLED(CONFIG_EROFS_FS_PCPU_KTHREAD_HIPRI)) > sched_set_fifo_low(worker->task); > - else > - sched_set_normal(worker->task, 0); > return worker; > } > > -- > 2.24.4 > Looks good! Reviewed-by: Sandeep Dhavale <dhavale@google.com>
On 2023/5/22 17:21, Gao Xiang wrote: > As Sandeep shown [1], high priority RT per-cpu kthreads are > typically helpful for Android scenarios to minimize the scheduling > latencies. > > Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if > EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for > EROFS_FS_PCPU_KTHREAD. > > Also clean up unneeded sched_set_normal(). > > [1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com > Cc: Sandeep Dhavale <dhavale@google.com> > Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Reviewed-by: Chao Yu <chao@kernel.org> Thanks,
diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig index 704fb59577e0..f259d92c9720 100644 --- a/fs/erofs/Kconfig +++ b/fs/erofs/Kconfig @@ -121,6 +121,7 @@ config EROFS_FS_PCPU_KTHREAD config EROFS_FS_PCPU_KTHREAD_HIPRI bool "EROFS high priority per-CPU kthread workers" depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD + default y help This permits EROFS to configure per-CPU kthread workers to run at higher priority. diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 92f3a01262cf..3ba505434f03 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -367,8 +367,6 @@ static struct kthread_worker *erofs_init_percpu_worker(int cpu) return worker; if (IS_ENABLED(CONFIG_EROFS_FS_PCPU_KTHREAD_HIPRI)) sched_set_fifo_low(worker->task); - else - sched_set_normal(worker->task, 0); return worker; }