Received: by 10.223.148.5 with SMTP id 5csp6030551wrq; Wed, 17 Jan 2018 08:34:10 -0800 (PST) X-Google-Smtp-Source: ACJfBoukDQqNqkMJQe80PUk8d2m4wc1uHDkljpZZPt0awkPMvQxxBDtMUo4Y/rs0nX0JAdSSLIcH X-Received: by 10.84.179.129 with SMTP id b1mr8336763plc.20.1516206850253; Wed, 17 Jan 2018 08:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516206850; cv=none; d=google.com; s=arc-20160816; b=YMkzJfUdSKpFlAG5Vw3F+7oyI07HZj+5KJEV7baRx5h4bgPziPISpgCDkF6qE8zzQA PmcYz22je4CcZjf4nFkm0AHEClu89Y3Ghe0l06CIckDDyF4ozAJaVHsy1wgthCOSAbhU 4qBgjWVVMn5XduZXu8TWM44MQYsCa3/MNnO7cFLvvI4f8KzmbnjQ4mjyVidbDn/DgoDw Ot49Ymz/sdfV0yQhi3Dj6gWHo8s65199FaMyif8ryMCW76qtaVGo+uFnjSd/GECjCTzO lSmBx3BNZ237VHeMpogXbYS4x2EUBWOsP3rkS3twhe966MciQap0I7BeBfuAvA72TKec bItA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=kocO0IEh/KMqESkvQLJ3tW27XlzfHTWD/MvVY23prrM=; b=I8SL/75kqqv6kBtgXINEiINcM5X2lVUwE6/jt6QYzfg5j2RMU4N/HHTo5s77xnJfsn 9R26qVB5JoCG1yccINh5KadWcKIul/yq4C+ZWOTWj3KoJr9Scggi+lLTVb2Vp7J3xdeD HvFOrGS/I3NH9hzaIbXW30TQ4CQT4pIwQRLcuguXWVPm7izAzni1/xnVIFy7onetqMeK Z9U0flQt1baLYzHcBDHVCww3SG35UZe9KY2xzOcaCi32U43R0ex3wnD+N5BtE26ESH+J ETL0M4e+SsTHBv2ilUHl0ENR692PLcuw/bx3JLWl4KkecRMWUjTMN+nHLBJsGnc55TDM nR5Q== ARC-Authentication-Results: i=1; mx.google.com; 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 l5si2286217pli.162.2018.01.17.08.33.55; Wed, 17 Jan 2018 08:34:10 -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; 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 S1754520AbeAQQcq (ORCPT + 99 others); Wed, 17 Jan 2018 11:32:46 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:45613 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754007AbeAQQcl (ORCPT ); Wed, 17 Jan 2018 11:32:41 -0500 X-Originating-IP: 50.39.166.153 Received: from localhost (50-39-166-153.bvtn.or.frontiernet.net [50.39.166.153]) (Authenticated sender: josh@joshtriplett.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id CA48AC5A63; Wed, 17 Jan 2018 17:32:37 +0100 (CET) Date: Wed, 17 Jan 2018 08:32:35 -0800 From: Josh Triplett To: Arnd Bergmann Cc: "Paul E. McKenney" , Nicolas Pitre , Linux Kernel Mailing List Subject: Re: [PATCH RFC tip/core/rcu] Make SRCU be once again optional Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) 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 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. - Josh Triplett