From: Josh Triplett <josh@joshtriplett.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC tip/core/rcu] Make SRCU be once again optional
Date: Wed, 17 Jan 2018 08:32:35 -0800 [thread overview]
Message-ID: <20180117163235.GA14896@localhost> (raw)
In-Reply-To: <CAK8P3a0=y=-9q7hzsBvEXdoKp=E+d93J9R9zntt-ysOF5BW4cw@mail.gmail.com>
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
> <paulmck@linux.vnet.ibm.com> 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
next prev parent reply other threads:[~2018-01-17 16:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 21:15 [PATCH RFC tip/core/rcu] Make SRCU be once again optional Paul E. McKenney
2017-04-28 21:51 ` Nicolas Pitre
2017-04-29 0:10 ` Paul E. McKenney
2017-05-12 18:41 ` Paul E. McKenney
2017-05-12 18:45 ` Paul E. McKenney
2017-05-12 18:59 ` Nicolas Pitre
2017-05-12 19:10 ` Paul E. McKenney
2017-06-03 3:59 ` Paul E. McKenney
2017-06-03 5:18 ` Nicolas Pitre
2017-06-03 20:36 ` Paul E. McKenney
2018-01-16 21:02 ` Arnd Bergmann
2018-01-16 21:10 ` Arnd Bergmann
2018-01-16 22:34 ` Paul E. McKenney
2018-01-16 22:55 ` Arnd Bergmann
2018-01-16 23:03 ` Arnd Bergmann
2018-01-16 23:57 ` Paul E. McKenney
2018-01-17 10:29 ` Arnd Bergmann
2018-01-17 16:32 ` Josh Triplett [this message]
2018-01-17 17:10 ` Arnd Bergmann
2018-01-17 16:47 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180117163235.GA14896@localhost \
--to=josh@joshtriplett.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=paulmck@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.