linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Alberto Milone <alberto.milone@canonical.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-fsdevel@vger.kernel.org, mingo@kernel.org
Subject: Re: [PATCH 1/1] radix-tree: do not export radix_tree_preloads as GPL
Date: Fri, 17 Jul 2020 09:34:39 -0500	[thread overview]
Message-ID: <20200717143439.GL3644@ubuntu-x1> (raw)
In-Reply-To: <20200717142848.GK3644@ubuntu-x1>

On Fri, Jul 17, 2020 at 09:28:48AM -0500, Seth Forshee wrote:
> On Fri, Jul 17, 2020 at 03:45:10PM +0200, Alberto Milone wrote:
> > On 17/07/2020 15:21, Sebastian Andrzej Siewior wrote:
> > > On 2020-07-17 14:33:31 [+0200], Alberto Milone wrote:
> > >> I checked and CONFIG_DEBUG_LOCK_ALLOC is not enabled in our kernels.
> > > The access to that variable is optimized away if not for debug. I made
> > > this:
> > > | #include <linux/module.h>
> > > | #include <linux/idr.h>
> > > | 
> > > | static int le_init(void)
> > > | {
> > > |         idr_preload_end();
> > > |         return 0;
> > > | }
> > > | module_init(le_init);
> > > | 
> > > | static void le_exit(void)
> > > | {
> > > | }
> > > | module_exit(le_exit);
> > > |    
> > > | MODULE_DESCRIPTION("driver");
> > > | MODULE_LICENSE("prop");
> > >
> > > and it produced a .ko. Here the "idr_preload_end()" was reduced to
> > > "preempt_enable()" as intended. No access to
> > > "&radix_tree_preloads.lock".
> > >
> > > Sebastian
> > * Subscribing Seth
> 
> Looks like the driver is not using idr_preload_end() though, it is
> calling radix_tree_preload_end() which uses radix_tree_preloads whether
> or not CONFIG_DEBUG_LOCK_ALLOC is enabled.

Sorry, I didn't dig deep enough. I see that radix_tree_preload_end() is
expected to opimize away that access too. I wonder if different
toolchains could be ending up with different reults.

Seth

  parent reply	other threads:[~2020-07-17 14:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 10:18 [PATCH 1/1] radix-tree: do not export radix_tree_preloads as GPL Alberto Milone
2020-07-17 10:43 ` Sebastian Andrzej Siewior
     [not found]   ` <ba5d59f6-2e40-d13a-ecc8-d8430a1b6a14@canonical.com>
2020-07-17 12:35     ` Fwd: " Alberto Milone
2020-07-17 13:21     ` Sebastian Andrzej Siewior
2020-07-17 13:45       ` Alberto Milone
2020-07-17 14:28         ` Seth Forshee
2020-07-17 14:31           ` Sebastian Andrzej Siewior
2020-07-17 14:34           ` Seth Forshee [this message]
     [not found]             ` <20200717155519.GM3644@ubuntu-x1>
2020-07-20 14:49               ` Seth Forshee

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=20200717143439.GL3644@ubuntu-x1 \
    --to=seth.forshee@canonical.com \
    --cc=alberto.milone@canonical.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).