From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E. McKenney" <paulmck@us.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] locking changes for v4.11
Date: Mon, 20 Feb 2017 23:38:44 +0100 [thread overview]
Message-ID: <20170220223844.GA12642@gmail.com> (raw)
In-Reply-To: <CA+55aFwVYhWuAaQdU97k2Ru5q4DR7Hzo8aNmDsovFpWwJGSgmw@mail.gmail.com>
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Mon, Feb 20, 2017 at 1:54 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > - Implement wraparound-safe refcount_t and kref_t types based on generic atomic
> > primitives (Peter Zijlstra)
>
> Ugh. This apparently never got the uninlining fixes?
Yeah, will fix it ASAP!
> I've pulled it, but I still don't like the inlining. Particularly with
> CONFIG_DEBUG_REFCOUNT it generates obnnoxious code, but even without
> the debugging there's just no point in it.
>
> Being inlined also means that architectures cannot optimize it, which
> is sad. If you have a LL/SC model for atomics, then using
> atomic_cmpxchg_relaxed() for the refcounting is just too stupid for
> words.
>
> So I continue to think this code should
>
> (a) be in lib/refcount.c, with just the declarations in the header
> file (oh, keep the "set" and "read" functions inline by all means)
>
> (b) be marked __weak, so that architectures like ARM/PPC can decide
> to do their own improved implementations.
Yeah, agreed, will do.
> But as mentioned, it's in my tree as-is now and going through the build test.
Thanks!
Ingo
prev parent reply other threads:[~2017-02-20 22:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 9:54 [GIT PULL] locking changes for v4.11 Ingo Molnar
2017-02-20 10:26 ` [GIT PULL v2] " Ingo Molnar
2017-02-20 21:31 ` [GIT PULL] " Linus Torvalds
2017-02-20 22:38 ` Ingo Molnar [this message]
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=20170220223844.GA12642@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@us.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 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.