linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Will Deacon <will.deacon@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, David Ahern <dsahern@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Question about barriers for ARM on tools/perf/
Date: Fri, 8 May 2015 15:18:44 -0300	[thread overview]
Message-ID: <20150508181844.GN7862@kernel.org> (raw)
In-Reply-To: <20150508164534.GK25587@arm.com>

Em Fri, May 08, 2015 at 05:45:35PM +0100, Will Deacon escreveu:
> On Fri, May 08, 2015 at 04:27:59PM +0100, Peter Zijlstra wrote:
> > On Fri, May 08, 2015 at 11:57:01AM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, May 08, 2015 at 03:48:20PM +0100, Will Deacon escreveu:

> > > > Do you know what the objection to the intrinsics was? I believe that
> > > > the __sync versions are deprecated in favour of the C11-like __atomic
> > > > flavours, so if that was all the objection was about then we could use
> > > > one or the other depending on what the compiler supports.
 
> > > Peter? Ingo?

> > I cannot remember, the __sync things should mostly work I suppose, and
> > if you wrap then in the normal atomic interface we don't have to learn
> > yet another API.
 
> Yeah, I think that's a good idea.

I'll use what I have, that is what I posted, i.e. something that was
tested. As we test it further, then we can either lift more stuff from
the kernel or add more compiler-foo.h stuff like we have in the kernel.
 
> > That said, I've successfully lifted this kernel code into userspace in
> > the past.
> 
> Lifting a copy isn't too bad, it's using the same file that worries me.

So that is how I'll proceed, lifting a copy of just what I need, lifting
more as the need arises, and fallbacking to gcc intrinsics for
architectures where the implementations drag too much stuff.

Over time, as the need arises, maybe to support some older compiler or
some problematic toolchain, lifting more from the kernel may be desired
and should be considered.

- Arnaldo

  reply	other threads:[~2015-05-08 18:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 14:04 Question about barriers for ARM on tools/perf/ Arnaldo Carvalho de Melo
2015-05-08 14:16 ` Peter Zijlstra
2015-05-08 14:21   ` Will Deacon
2015-05-08 14:23     ` Peter Zijlstra
2015-05-08 14:21 ` Will Deacon
2015-05-08 14:25   ` Peter Zijlstra
2015-05-08 14:27     ` Will Deacon
2015-05-08 14:36       ` David Ahern
2015-05-08 14:37     ` Arnaldo Carvalho de Melo
2015-05-08 14:48       ` Will Deacon
2015-05-08 14:57         ` Arnaldo Carvalho de Melo
2015-05-08 15:27           ` Peter Zijlstra
2015-05-08 16:45             ` Will Deacon
2015-05-08 18:18               ` Arnaldo Carvalho de Melo [this message]
2015-05-08 14:52       ` Arnaldo Carvalho de Melo

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=20150508181844.GN7862@kernel.org \
    --to=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.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 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).