Received: by 10.223.148.5 with SMTP id 5csp6087102wrq; Wed, 17 Jan 2018 09:11:05 -0800 (PST) X-Google-Smtp-Source: ACJfBov9IE3WvfsHXwSxrhS1gDaXwVpFbkY91ibN727V5KJR4bx1zItRXEv4UYAX5BBotNdRloz4 X-Received: by 10.84.192.129 with SMTP id c1mr15647294pld.211.1516209065545; Wed, 17 Jan 2018 09:11:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516209065; cv=none; d=google.com; s=arc-20160816; b=CbO9KqjroU5u+PA1cnkVZw2Qql367Ho2L/dDO9YLGZfUbZyoFL/uPKLMl1xFrApnRV bUv6YyQ/T1adMepQo0SQQASTTNRIeZrjQC7gwXmQWLAJWOFjTB//UPjMO1HdtA51xA8a CSYY5slrkeHxbCGcMDxt/gAjYuXwykrRNpPD1y07HwLLGFPl2dmH/ygVEAyiBKjztzL+ HdwUZYfqRl+SJwkQHk6USoLWJYe7GA7CoCITLykYYVnTk2bKSA9+CK+0eyV0uLvQTEXQ FTpMeCuRmFcpjRRyX45sY5szFxTRGfDVlvqP/5p6fdYj7Pf6RbdhKTbEuBssMvB58AGA Kl/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=z+hjNfGUPG3+22KkOw9B/YAc+4WxfJ6NhIBNDrYKK5Y=; b=D76LtGKBlMrthZbSPLD8B3aXg/+CRtAuBkonxAzyvzHZ6opSktlxDUNgH390KavDnp Ao+k5/8oVUOYOklE46toYAl2SRuqL4vpIPUnWAQqkElsy5H/XiT/WqmSgxMt1ttOeCS/ ogE2d7ZfCDRF2Bzau8RG57LPWItdHPwKzcHiWbSMAxZHW7Z6l20NoefG1FfYEAiq3wvK E20VQRdybGXiJ8TA6SVCD0QwrC+SisqbNfCqS/qk/Q6r26SWHOo+46ThE+GSjfmM7l9D DZXVPOzfuceJwvEIbbvQagj1n6oZXNXtRHgrdHAE9bVnV9s4YyOcJ4hEqBXH8uMBVWds CGjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=N4FGUqqz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si4711615plj.292.2018.01.17.09.10.51; Wed, 17 Jan 2018 09:11:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=N4FGUqqz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754008AbeAQRKQ (ORCPT + 99 others); Wed, 17 Jan 2018 12:10:16 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:42517 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbeAQRKP (ORCPT ); Wed, 17 Jan 2018 12:10:15 -0500 Received: by mail-ot0-f193.google.com with SMTP id s3so17450075otc.9 for ; Wed, 17 Jan 2018 09:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=z+hjNfGUPG3+22KkOw9B/YAc+4WxfJ6NhIBNDrYKK5Y=; b=N4FGUqqzZk1oIkDRRHt1ogfwrAXmwZF/DIu6/OqW1bq2jXmZjgjht3dNO0ahovH4UG 4BXCbNhxUx3SfBiOuOgOr7YghKGh4zO8cCG0EOy0DxfwekPjwUKQU8SxfNi6+9QBUu1y EJU8vSNApCXb1m8qShS/gFYmJPUcSDH+QwBROjBsnHSbIgJMRA4wkoVXxgA0+5MgOGTr zrzUjUV6n47crMMPJHtubMmyAuX5s02wbe6jkz5qsMEqjjE5KoXWoiyJ3Yb9UOaIap4w PJhyxnn+z24avYSbSYdHlgx65OhcI/pFERrgRG//kcVAAiYoaATKQKxW5FRpkHrBPv9Y PmFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=z+hjNfGUPG3+22KkOw9B/YAc+4WxfJ6NhIBNDrYKK5Y=; b=q+o+uL+qNCeBY2ZhLxxrST0g6CTtw2KBeEfFqxewC2TKPaGADvTY9RmecCe9jwvRRw TwBCzRiVVwWIuc9Xb1qi5TnXU7JvBYwInnqPz8Jf0LujNiW8AgJsWyobgGqTwV5U/sRx GnT5SiaGGx45FdqXWlh0y3u7q5lBufvN9qATs6gZQvy1i7ccIdnihOVR39F4rC74ZRq/ KBZ0gpWtppQ95vvHe4IvIZyPXFSt5kx1y367f+JtqvW6QrkGMX6Qil9Ct5FE2J66p7II Y2vaXfsiwT5K1JgmViN2/3ks5ThIyoV0Cmvf2tCcQvrhZjch/X89ccj5YEXk7cb0IZtE tAxA== X-Gm-Message-State: AKwxyteiXkiMstgZ5iNjlrpUsypNeEJhBhRtKgfdilCda/lDgGtGcxRl XvtLN+6v/CtK4axNZZB7HDq6yaDF2HuM+nakE2E= X-Received: by 10.157.67.90 with SMTP id y26mr1474203oti.229.1516209014584; Wed, 17 Jan 2018 09:10:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.17.89 with HTTP; Wed, 17 Jan 2018 09:10:14 -0800 (PST) In-Reply-To: <20180117163235.GA14896@localhost> References: <20170512191005.GE3956@linux.vnet.ibm.com> <20170603035915.GA23375@linux.vnet.ibm.com> <20170603203620.GL3721@linux.vnet.ibm.com> <20180116223431.GA9671@linux.vnet.ibm.com> <20180116235703.GD9671@linux.vnet.ibm.com> <20180117163235.GA14896@localhost> From: Arnd Bergmann Date: Wed, 17 Jan 2018 18:10:14 +0100 X-Google-Sender-Auth: 78F1L-rFx3wSCIda1EGUbNjNq2o Message-ID: Subject: Re: [PATCH RFC tip/core/rcu] Make SRCU be once again optional To: Josh Triplett Cc: "Paul E. McKenney" , Nicolas Pitre , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 17, 2018 at 5:32 PM, Josh Triplett wrote: > On Wed, Jan 17, 2018 at 11:29:26AM +0100, Arnd Bergmann wrote: >> On Wed, Jan 17, 2018 at 12:57 AM, Paul E. McKenney >> wrote: >> > On Wed, Jan 17, 2018 at 12:03:18AM +0100, Arnd Bergmann wrote: >> >> Evidently there is at least one driver that uses SRCU but doesn't 'select SRCU' >> >> in Kconfig. There are probably others that just haven't been found. >> > >> > Does adding "select SRCU" on "config PM_SLEEP" in kernel/power/Kconfig >> > fix this? >> >> I'm sure it does, but the point I was making is that we probably have a number >> of those, and would never find the other ones through the current build test >> setup. >> >> I've now tried disabling a ridiculous number of options to come up with a >> setup that never enables SRCU. Interestingly, that also means we don't >> get the drivers/base/power/wakeup.c problem in 'allmodconfig', though >> I did get a link-time error: > [...] >> Turning off lockdep and kmemleak gives me a working allmodconfig build. >> I'm doing some more testing on ARM, but it looks like this is a dark corner >> of the randconfig state space that I'm not sure I want to explore more. >> >> Doing an hour of randconfig builds, I already found exactly two missing >> 'select SRCU': >> >> ERROR: "__srcu_read_unlock" [drivers/infiniband/core/ib_uverbs.ko] undefined! >> drivers/base/power/wakeup.c:68:1: error: type defaults to 'int' in >> declaration of 'DEFINE_STATIC_SRCU' [-Werror=implicit-int] > > I've found that, when trying to make something optional, it doesn't > suffice to do randconfigs. You need a configuration with *everything* > enabled, except for the option you want to test disabling, and anything > that depends on or selects that option. And, conversely, when testing > if a specific option has all the dependencies it needs, you want a > configuration with that option and its dependencies/selects enabled > and everything else disabled. > > I wonder how easily we could make a kconfig option for an "all except" > or "none except" config? Such an option would read a minimal config > snippet containing only specific options, and then act like > allyesconfig/allmodconfig/allnoconfig as long as doing so doesn't > change anything from the minimal config snippet. Well, that's what I tried with the patch above that marks tons of options as 'BROKEN', leaving all the options that don't select SRCU. The funny thing is that the "everything but SRCU" config worked just fine, but with the same patch, 'randconfig' failed one out of 10 times ;-) Arnd