From patchwork Wed Nov 6 18:57:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1190622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 477bQD3Nxwz9sPF; Thu, 7 Nov 2019 05:57:56 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iSQV6-0001kX-Kb; Wed, 06 Nov 2019 18:57:52 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSQV4-0001kG-1K for kernel-team@lists.ubuntu.com; Wed, 06 Nov 2019 18:57:50 +0000 Received: from mail-qk1-f200.google.com ([209.85.222.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSQV3-00040r-Ph for kernel-team@lists.ubuntu.com; Wed, 06 Nov 2019 18:57:49 +0000 Received: by mail-qk1-f200.google.com with SMTP id a16so14271801qka.10 for ; Wed, 06 Nov 2019 10:57:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=plkTGjeidqFObmpotPOBOibAbdm6w4gUq3LbEoHjd0I=; b=h47eAys3+wumd9QcQ2sru30o4YQeO3UCLBCUYzRDBYnJNjq5/j//J7PTpJa8cANQ/t q093Bfu4Fg5cAOhL/Ekh2FXmM0x/IrfH45U2hhFBG4JbtfMJ+KvtQiRRVvT920v1MDea IfCzgf3Iwya7EumSjFc0FRnKoMo9ap2z/7rM9jUB3Nr2HYa0dVKc6VdQA23eebNSb1bo sz5f+bW4qwj1dVwaqC7EJk0JufRaxn8vHZqH5qGS4VwNWk4Zhl/WMQ9BCt+F67p/btPc bEIVb4tPTcyzzs5dwfFomuyoVQ3bSUi3TpL9pN2TrEMPeRPTMRRWX7qW7VRrblxwCJ6W lObA== X-Gm-Message-State: APjAAAWiqUXvTT3kK+9HsVujvAnUf0BAKDXimkJSzhPqRd13jQ+r2kAU mqGPip7xZrmeyQ6kQawuCANyCC0u68u+KU/dz0bRcuBeXbskyKjinsvzjwwFqDHxkragvWQtHLt ReSu4n9UDAA6ScoYi7R04E9QzmOq6qmGC3zxc9N7C X-Received: by 2002:ac8:6d31:: with SMTP id r17mr3943803qtu.28.1573066668442; Wed, 06 Nov 2019 10:57:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxhC0ygnJqpCoHSGQuh+cIdI8s5kMiYBqMCTTI7/RO85isGJi4z/OrNrhFLFtEhkyqiAeN4uQ== X-Received: by 2002:ac8:6d31:: with SMTP id r17mr3943781qtu.28.1573066668139; Wed, 06 Nov 2019 10:57:48 -0800 (PST) Received: from gallifrey.lan ([2804:14c:4e6:443:946b:525b:cf5:2c60]) by smtp.gmail.com with ESMTPSA id s21sm6478841qkg.24.2019.11.06.10.57.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 10:57:47 -0800 (PST) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [eoan:linux-gcp][PATCH 1/2] UBUNTU: SAUCE: raid6: Add option for default PQ algorithm Date: Wed, 6 Nov 2019 15:57:38 -0300 Message-Id: <20191106185742.5835-2-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191106185742.5835-1-marcelo.cerri@canonical.com> References: <20191106185742.5835-1-marcelo.cerri@canonical.com> 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/1812728 BugLink: https://bugs.launchpad.net/bugs/1851538 Add a new config ("CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL") to enable specifying a default gen() algorithm for RAID_PQ via the kernel "raid6_pq_default_alg" cmdline option. When a default algorithm is given, the raid6_pq module will skip the performance round of tests. The config CONFIG_RAID6_PQ_DEFAULT_ALG can be used to define a default value for the kernel option. Signed-off-by: Marcelo Henrique Cerri --- lib/Kconfig | 17 +++++++++++++++++ lib/raid6/algos.c | 26 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index 4e6b1c3e4c98..dae35c80dfda 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -19,6 +19,23 @@ config RAID6_PQ_BENCHMARK Benchmark all available RAID6 PQ functions on init and choose the fastest one. +config RAID6_PQ_DEFAULT_ALG_BOOL + bool "Default RAID6 PQ algorithm" + default n + depends on RAID6_PQ + help + Allow for specifying a default algorithm via the kernel + parameter "raid6_pq_default_alg", which forces the performance + tests to be skipped. This can save between 500ms to 2s + during boot. + +config RAID6_PQ_DEFAULT_ALG + string "Default RAID6 PQ algorithm name" + default "" + depends on RAID6_PQ_DEFAULT_ALG_BOOL + help + The default algorithm name to be used by default. + config PACKING bool "Generic bitfield packing and unpacking" default n diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 608b648261bd..67af502eada3 100644 --- a/lib/raid6/algos.c +++ b/lib/raid6/algos.c @@ -25,6 +25,12 @@ EXPORT_SYMBOL(raid6_empty_zero_page); #endif #endif +#ifdef CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL +static char raid6_pq_default_alg[32] = CONFIG_RAID6_PQ_DEFAULT_ALG; +module_param_string(raid6_pq_default_alg, raid6_pq_default_alg, sizeof(raid6_pq_default_alg), 0444); +MODULE_PARM_DESC(raid6_pq_default_alg, "Default gen/xor() algorithm"); +#endif + struct raid6_calls raid6_call; EXPORT_SYMBOL_GPL(raid6_call); @@ -153,6 +159,26 @@ static inline const struct raid6_calls *raid6_choose_gen( const struct raid6_calls *const *algo; const struct raid6_calls *best; +#ifdef CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL + if (strlen(raid6_pq_default_alg)) { + for (algo = raid6_algos; *algo; algo++) { + if (!strncmp(raid6_pq_default_alg, (*algo)->name, sizeof(raid6_pq_default_alg))) { + if ((*algo)->valid && !(*algo)->valid()) { + pr_info("raid6: default alg \"%s\" is invalid.\n", + raid6_pq_default_alg); + continue; + } + pr_info("raid6: using default algorithm %s gen() without performace tests.\n", + (*algo)->name); + raid6_call = **algo; + return *algo; + } + } + pr_info("raid6: default alg \"%s\" not found. Choosing the best alg as fallback...\n", + raid6_pq_default_alg); + } +#endif + for (bestgenperf = 0, bestxorperf = 0, best = NULL, algo = raid6_algos; *algo; algo++) { if (!best || (*algo)->prefer >= best->prefer) { /* 2 ^ (RAID6_TIME_JIFFIES_LG2 - 0.5) */ From patchwork Wed Nov 6 18:57:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1190624 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 477bQF5Zh4z9sP4; Thu, 7 Nov 2019 05:57:57 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iSQV8-0001lU-1N; Wed, 06 Nov 2019 18:57:54 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSQV6-0001kR-8h for kernel-team@lists.ubuntu.com; Wed, 06 Nov 2019 18:57:52 +0000 Received: from mail-qt1-f200.google.com ([209.85.160.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSQV6-000411-0L for kernel-team@lists.ubuntu.com; Wed, 06 Nov 2019 18:57:52 +0000 Received: by mail-qt1-f200.google.com with SMTP id q54so27136254qtk.15 for ; Wed, 06 Nov 2019 10:57:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z/iJoyjLRrGajfZiUXSiWSfVJ46XS1uhkgZXkd1jsHE=; b=kKCFCS8vKHJBzHjQwJm/4zEn41/fn6pcSb2skePuWEw2U3/TbLIjme7L6/HQWI5cfP C5ZnrlZ2K4yUc2s7LsGLxw406V0j0MpNHuxGnbeNynhQeSXUJI4jXnNaX3VQts8wMPNI pH7wIZTxQ8dOQdIYdd4myisHzmti1bBcRlRooBbZWPAvzno4jSAeQ5+KqgsBl2/wKp4P bTiw29HfDGyQ0tDDpcfMtdUQaXfLYhsKn9D16oFpyScM8igADUPeooioJgnpEMPfEfqv Cy/uA0wQtBAIb9EZQlWO6jLm8ucdgoqybErHeFfUP3jycbkrArNnJQY3EZUPGDQMgcRr KGXg== X-Gm-Message-State: APjAAAXLMJtrfbjAKUmeDvupLHJfkiGeQYijEbOghmgWLDHJrFjoTJ2Z x3qsuPOuFkE3JdJnqusu0oo6ccYMhI3YVNsYRbSUKHH9wMhbC12Xw5EjlmxobDFeSa+4V9UZIV7 UnQ5QQ5eDUtizzhPu2xWAKfNUAZSUXTTN1/nrbND8 X-Received: by 2002:a37:9c8d:: with SMTP id f135mr3487304qke.431.1573066670622; Wed, 06 Nov 2019 10:57:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxh0f2ByojoXhallZnPMDQhpHBNzlt1aLbLMtkeR+VMCTWZBQEo9ZoPFpM8oneptdWB+gEv1Q== X-Received: by 2002:a37:9c8d:: with SMTP id f135mr3487286qke.431.1573066670220; Wed, 06 Nov 2019 10:57:50 -0800 (PST) Received: from gallifrey.lan ([2804:14c:4e6:443:946b:525b:cf5:2c60]) by smtp.gmail.com with ESMTPSA id s21sm6478841qkg.24.2019.11.06.10.57.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 10:57:49 -0800 (PST) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [eoan:linux-gcp][PATCH 2/2] UBUNTU: [Config] Fix annotations file Date: Wed, 6 Nov 2019 15:57:39 -0300 Message-Id: <20191106185742.5835-3-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191106185742.5835-1-marcelo.cerri@canonical.com> References: <20191106185742.5835-1-marcelo.cerri@canonical.com> 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/1851538 Replace ENFORCE with ENFORCED to ensure the config options checks are not being ignored. Also update the corresponding config options back to the desirable value. Signed-off-by: Marcelo Henrique Cerri --- debian.gcp/abi/5.3.0-1006.6/amd64/gcp.modules | 1 - debian.gcp/config/annotations | 42 +++++++++---------- debian.gcp/config/config.common.ubuntu | 4 +- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/debian.gcp/abi/5.3.0-1006.6/amd64/gcp.modules b/debian.gcp/abi/5.3.0-1006.6/amd64/gcp.modules index 44d8f4cd0650..c3d5eeae9e86 100644 --- a/debian.gcp/abi/5.3.0-1006.6/amd64/gcp.modules +++ b/debian.gcp/abi/5.3.0-1006.6/amd64/gcp.modules @@ -1005,7 +1005,6 @@ dmm32at dmx3191d dn_rtmsg dnet -dp83640 dp83822 dp83848 dp83867 diff --git a/debian.gcp/config/annotations b/debian.gcp/config/annotations index 9eeda849d8da..441de7cad8a5 100644 --- a/debian.gcp/config/annotations +++ b/debian.gcp/config/annotations @@ -7,79 +7,79 @@ include "../../debian.master/config/annotations" # Menu: Device Drivers >> Block devices CONFIG_BLK_DEV_FD policy<{'amd64': 'n'}> # -CONFIG_BLK_DEV_FD flag note +CONFIG_BLK_DEV_FD flag note # Menu: Device Drivers >> I2C support >> I2C support >> I2C Hardware Bus support CONFIG_I2C_AMD_MP2 policy<{'amd64': 'n'}> # -CONFIG_I2C_AMD_MP2 flag note +CONFIG_I2C_AMD_MP2 flag note # Menu: Device Drivers >> Network device support >> Wireless LAN >> Atheros/Qualcomm devices CONFIG_WCN36XX_SNAPDRAGON_HACKS policy<{'amd64': 'n'}> # -CONFIG_WCN36XX_SNAPDRAGON_HACKS flag note +CONFIG_WCN36XX_SNAPDRAGON_HACKS flag note # Menu: Device Drivers >> PTP clock support >> PTP clock support CONFIG_DP83640_PHY policy<{'amd64': 'n'}> # -CONFIG_DP83640_PHY mark note note +CONFIG_DP83640_PHY mark note note # Menu: Device Drivers >> SCSI device support >> SCSI device support >> SCSI low-level drivers CONFIG_SCSI_VIRTIO policy<{'amd64': 'y'}> # -CONFIG_SCSI_VIRTIO flag note note +CONFIG_SCSI_VIRTIO flag note note # Menu: Device Drivers >> X86 Platform Specific Device Drivers CONFIG_DELL_UART_BACKLIGHT policy<{'amd64': 'n'}> CONFIG_DELL_SMBIOS_SMM policy<{'amd64': 'n'}> # -CONFIG_DELL_UART_BACKLIGHT flag note -CONFIG_DELL_SMBIOS_SMM flag note +CONFIG_DELL_UART_BACKLIGHT flag note +CONFIG_DELL_SMBIOS_SMM flag note # Menu: Kernel hacking CONFIG_PANIC_ON_OOPS policy<{'amd64': 'y'}> # -CONFIG_PANIC_ON_OOPS flag note note +CONFIG_PANIC_ON_OOPS flag note note # Menu: Kernel hacking >> Debug Lockups and Hangs CONFIG_BOOTPARAM_HARDLOCKUP_PANIC policy<{'amd64': 'y'}> CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC policy<{'amd64': 'y'}> # -CONFIG_BOOTPARAM_HARDLOCKUP_PANIC flag note -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC flag note +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC flag note +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC flag note # Menu: Library routines -CONFIG_RAID6_PQ_DEFAULT_ALG policy<'amd64': 'avx2x4'> -CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL policy<'amd64': 'y'> +CONFIG_RAID6_PQ_DEFAULT_ALG policy<{'amd64': '"avx2x4"'}> +CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL policy<{'amd64': 'y'}> # -CONFIG_RAID6_PQ_DEFAULT_ALG mark note -CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL mark note +CONFIG_RAID6_PQ_DEFAULT_ALG mark note +CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL mark note # Menu: Networking support >> Bluetooth subsystem support >> Bluetooth device drivers CONFIG_BT_QCOMSMD_HACK policy<{'amd64': 'n'}> # -CONFIG_BT_QCOMSMD_HACK flag note +CONFIG_BT_QCOMSMD_HACK flag note # Menu: Networking support >> Networking options CONFIG_NETWORK_PHY_TIMESTAMPING policy<{'amd64': 'n'}> # -CONFIG_NETWORK_PHY_TIMESTAMPING flag note note +CONFIG_NETWORK_PHY_TIMESTAMPING flag note note # Menu: Networking support >> Networking options >> Network packet filtering framework (Netfilter) >> Core Netfilter Configuration CONFIG_NETFILTER_NETLINK_QUEUE policy<{'amd64': 'y'}> CONFIG_NETFILTER_NETLINK_LOG policy<{'amd64': 'y'}> # -CONFIG_NETFILTER_NETLINK_QUEUE flag note -CONFIG_NETFILTER_NETLINK_LOG flag note +CONFIG_NETFILTER_NETLINK_QUEUE flag note +CONFIG_NETFILTER_NETLINK_LOG flag note # Menu: Networking support >> Networking options >> Network packet filtering framework (Netfilter) >> Core Netfilter Configuration >> Netfilter connection tracking support CONFIG_NF_CONNTRACK policy<{'amd64': 'y'}> CONFIG_NF_CONNTRACK_PROCFS policy<{'amd64': 'y'}> CONFIG_NF_CT_NETLINK policy<{'amd64': 'y'}> # -CONFIG_NF_CONNTRACK flag note -CONFIG_NF_CONNTRACK_PROCFS flag note -CONFIG_NF_CT_NETLINK flag note +CONFIG_NF_CONNTRACK flag note +CONFIG_NF_CONNTRACK_PROCFS flag note +CONFIG_NF_CT_NETLINK flag note CONFIG_NF_CONNTRACK_PROCFS flag # diff --git a/debian.gcp/config/config.common.ubuntu b/debian.gcp/config/config.common.ubuntu index 587e7a311d76..38add6a055fa 100644 --- a/debian.gcp/config/config.common.ubuntu +++ b/debian.gcp/config/config.common.ubuntu @@ -1689,7 +1689,7 @@ CONFIG_DNET=m CONFIG_DNOTIFY=y CONFIG_DNS_RESOLVER=y CONFIG_DOUBLEFAULT=y -CONFIG_DP83640_PHY=m +# CONFIG_DP83640_PHY is not set CONFIG_DP83822_PHY=m CONFIG_DP83848_PHY=m CONFIG_DP83867_PHY=m @@ -5555,6 +5555,8 @@ CONFIG_RADIO_WL1273=m CONFIG_RADIO_WL128X=m CONFIG_RAID6_PQ=m CONFIG_RAID6_PQ_BENCHMARK=y +CONFIG_RAID6_PQ_DEFAULT_ALG="avx2x4" +CONFIG_RAID6_PQ_DEFAULT_ALG_BOOL=y CONFIG_RAID_ATTRS=m # CONFIG_RANDOM32_SELFTEST is not set CONFIG_RANDOMIZE_BASE=y