From patchwork Tue Jun 6 08:02:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1790910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=GOc6jXyS; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qb2yV4DW8z20Ty for ; Tue, 6 Jun 2023 18:02:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1q6ReF-0001dH-4q; Tue, 06 Jun 2023 08:02:35 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1q6ReC-0001bI-On for kernel-team@lists.ubuntu.com; Tue, 06 Jun 2023 08:02:32 +0000 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 79DA33F149 for ; Tue, 6 Jun 2023 08:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686038552; bh=TdPjOSeBCueBnm4rHVemSZaWI8dSJfvH2fQ5R8PhIvE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=GOc6jXySEvSwC51siPVVth0Ti7OOZ+faFnF22JQdtkz4KNOXq27Qssd3XIHJItrNo U3oTJbL5U4TmH0FnCncJCuw3OUlnuERgU7qQv+IiwTjY5ObrQNdUOUQmEzBgFeEYk0 Cdfr0/+yjsyuQ0QxEvv1ZMgTYFKgQOZFC+W8UKbA8YkrEC2XJPFqUsXPWRDHYoAOOB 8Taz7CPwxSx6sau/WAn4/osmyBfJ36eFt9jGTsAspakyGtx1lM3NslluCc0v4jSbn5 B6KZPg0tWCVvSuPDKSCIUmqizXljdb5hCBkRAkI0n3XXVZ1JLhDMx68cIOszeY83MV 739W+zJaBIEhA== Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5147d242f01so6575439a12.0 for ; Tue, 06 Jun 2023 01:02:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686038551; x=1688630551; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TdPjOSeBCueBnm4rHVemSZaWI8dSJfvH2fQ5R8PhIvE=; b=O3DDLhO/IR14nsWBNmTqseqjnEhTnWfKIP3CAJ4DFuU1b4XIIjXS445o9eZ26YmqoL wOnS7kXfsJovpLWzMuKx9iyjpno0My2WItEbQlfaFMCPu7SYO/khgqsMCQVdlPe7b+PE J4pW9QCni3yFsUM0up0QnOUeKMISjjUihf5CUQjCp1Z8qRId+HZSDfGqUhz9YXu2hxao jHsu0xkenSGZ2uZUl+6h4NtJ71Xje4h+HmquGQmhUbo+tGISihvvcJ3+aTkIZuPiHo7S w/QuO4CIHKk4LNIwvaaigHHAegJDSZs5v8OP9IuZjwymlDDiXElqisI4rNKdMaXCyIDz wb4g== X-Gm-Message-State: AC+VfDxVVGXapgnJWh1y+XRnKfaFhWEG/1g9Ogj9WHYOZ7RvWMnvhpD9 INsvBFvbL+gw9qa4+gduPIs7soI1NpvY8/5o92Tn2OYlpDDCme6SrN11ftFvewIrdcn/KQ3h3JI zjUYwdxNsZHEQL3DeyPJiFuhjmJwUKnPAwgovBofSNTFwKEezqA== X-Received: by 2002:a50:fb08:0:b0:514:224b:a48c with SMTP id d8-20020a50fb08000000b00514224ba48cmr1837841edq.0.1686038551594; Tue, 06 Jun 2023 01:02:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4PDWuoo3v+NgMBB5IGZpQvZON2USOEjx9j4BVC9Hiv5ZBkhbZVYHUY+u2LYaw/DYVqrrGYwA== X-Received: by 2002:a50:fb08:0:b0:514:224b:a48c with SMTP id d8-20020a50fb08000000b00514224ba48cmr1837819edq.0.1686038551214; Tue, 06 Jun 2023 01:02:31 -0700 (PDT) Received: from righiandr-XPS-13-7390.homenet.telecomitalia.it (host-87-3-121-235.retail.telecomitalia.it. [87.3.121.235]) by smtp.gmail.com with ESMTPSA id z15-20020aa7d40f000000b00514b2a9ce60sm4712758edq.81.2023.06.06.01.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 01:02:30 -0700 (PDT) From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [PATCH][M:lowlatency] UBUNTU: [Config] lowlatency: enhance desktop responsiveness Date: Tue, 6 Jun 2023 10:02:29 +0200 Message-Id: <20230606080229.65029-1-andrea.righi@canonical.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2023007 Enable the following kernel configs to make the lowlatency kernel more suitable for a desktop-oriented context and give access to additional run-time / boot-time user-space settings: - CONFIG_NO_HZ_FULL=y: enable access to "Full tickless mode" (shutdown clock tick when possible across all the enabled CPUs if they are either idle or running 1 task - reduce kernel jitter of running tasks due to the periodic clock tick, must be enabled at boot time passing `nohz_full=`) - CONFIG_RCU_NOCB_CPU=y, CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y: move RCU callbacks from softirq context to kthread context (reduce time spent in softirqs with preemption disabled to improve the overall system responsiveness, at the cost of introducing a potential performance penalty, because RCU callbacks are now processed by kernel threads) - CONFIG_RCU_LAZY=y: batch RCU callbacks and then flush them after a timed delay instead of executing them immediately (can provide 5~10% power-savings for idle or lightly-loaded systems, this is extremely useful for laptops / portable devices [1]) [1] https://lore.kernel.org/lkml/20221016162305.2489629-3-joel@joelfernandes.org/ Signed-off-by: Andrea Righi Acked-by: Andrei Gherzan --- debian.lowlatency/config/annotations | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/debian.lowlatency/config/annotations b/debian.lowlatency/config/annotations index fef2202364bc..737a55be4ae2 100644 --- a/debian.lowlatency/config/annotations +++ b/debian.lowlatency/config/annotations @@ -15,15 +15,35 @@ CONFIG_HZ_250 note<'Override default HZ used i CONFIG_LATENCYTOP policy<{'amd64': 'y', 'arm64': 'y'}> CONFIG_LATENCYTOP note<'https://lists.ubuntu.com/archives/kernel-team/2014-July/045006.html, LP#1655986'> +CONFIG_NO_HZ_FULL policy<{'amd64': 'y', 'arm64': 'y'}> +CONFIG_NO_HZ_FULL note<'Enable access to "Full tickless mode" (LP: #2023007)'> + +CONFIG_NO_HZ_IDLE policy<{'amd64': 'n', 'arm64': 'n'}> +CONFIG_NO_HZ_IDLE note<'Disabled in favor of CONFIG_NO_HZ_FULL (LP: #2023007)'> + CONFIG_PREEMPT policy<{'amd64': 'y', 'arm64': 'y'}> -CONFIG_PREEMPT note<'Enable fully preemptible kernel'> +CONFIG_PREEMPT note<'Enable fully preemptible kernel by default (can be changed at runtime via /sys/kernel/debug/sched/preempt)'> CONFIG_PREEMPT_VOLUNTARY policy<{'amd64': 'n', 'arm64': 'n'}> -CONFIG_PREEMPT_VOLUNTARY note<'Disable voluntary preemption model'> +CONFIG_PREEMPT_VOLUNTARY note<'Disable voluntary preemption model by default (can be changed at runtime via /sys/kernel/debug/sched/preempt)'> + +CONFIG_RCU_LAZY policy<{'amd64': 'y', 'arm64': 'y'}> +CONFIG_RCU_LAZY note<'Batch RCU callbacks and then flush them after a timed delay instead of executing them immediately (LP: #2023007)'> + +CONFIG_RCU_NOCB_CPU policy<{'amd64': 'y', 'arm64': 'y'}> +CONFIG_RCU_NOCB_CPU note<'Move RCU callbacks from softirq context to kthread context (LP: #2023007)'> + +CONFIG_RCU_NOCB_CPU_DEFAULT_ALL policy<{'amd64': 'y', 'arm64': 'y'}> +CONFIG_RCU_NOCB_CPU_DEFAULT_ALL note<'Enable CONFIG_RCU_NOCB_CPU across all CPUs by default (LP: #2023007)'> # ---- Annotations without notes ---- CONFIG_CC_VERSION_TEXT policy<{'amd64': '"x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1) 12.3.0"', 'arm64': '"aarch64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1) 12.3.0"'}> +CONFIG_CONTEXT_TRACKING_USER policy<{'amd64': 'y', 'arm64': 'y'}> +CONFIG_CONTEXT_TRACKING_USER_FORCE policy<{'amd64': 'n', 'arm64': 'n'}> CONFIG_GCC_VERSION policy<{'amd64': '120300', 'arm64': '120300'}> CONFIG_HZ policy<{'amd64': '1000', 'arm64': '1000'}> +CONFIG_TICK_CPU_ACCOUNTING policy<{'amd64': '-', 'arm64': '-'}> +CONFIG_VIRT_CPU_ACCOUNTING policy<{'amd64': 'y', 'arm64': 'y'}> +CONFIG_VIRT_CPU_ACCOUNTING_GEN policy<{'amd64': 'y', 'arm64': 'y'}>