All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH (sh-2.6)] sh: Use GCC __builtin_prefetch() to implement prefetch (V2)
Date: Thu, 18 Nov 2010 06:09:57 +0000	[thread overview]
Message-ID: <20101118060957.GA17539@linux-sh.org> (raw)
In-Reply-To: <1289976617-27704-1-git-send-email-peppe.cavallaro@st.com>

On Wed, Nov 17, 2010 at 12:01:27PM +0100, Peppe CAVALLARO wrote:
> On 11/17/2010 10:49 AM, Paul Mundt wrote:
> > Actually now that I think about it, it's not that simple. If
> > ARCH_HAS_PREFETCH goes away then we lose prefetch_range() (which
> > admittely isn't called anywhere that matters, but it may in the future).
> >
> > If gcc is smart enough to optimize out __builtin_prefetch() for the cases
> > where nothing has to be done, then the ARCH_HAS_PREFETCH define could
> > simply be killed and each arch would be responsible for establishing the
> > prefetch stride (this seems to vary between the size of an L1 or L2
> > cacheline depending on the platform). This is a different change though,
> > and is something you would have to bring up on linux-arch and
> > linux-kernel as a separate patch.
> >
> > Perhaps the easiest solution for now is just to stick with your first
> > version, which at least retains the stride data and prefetch_range()
> > behaviour.
> >
> Maybe it's worth having my first patch.
> We don't lose the prefetch_range behavior.
> Compiler should also be smart enough to manage the pref
> inst optimizing the generated code.

Ok, I've taken the first patch for the .37 queue. I've given it a spin on
SH-2A and things seem to be ok there, too.

      parent reply	other threads:[~2010-11-18  6:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17  6:50 [PATCH (sh-2.6)] sh: Use GCC __builtin_prefetch() to implement prefetch() Giuseppe CAVALLARO
2010-11-17  8:17 ` Paul Mundt
2010-11-17  8:51 ` [PATCH (sh-2.6)] sh: Use GCC __builtin_prefetch() to implement Peppe CAVALLARO
2010-11-17  9:27 ` [PATCH (sh-2.6)] sh: Use GCC __builtin_prefetch() to implement prefetch (V2) Giuseppe CAVALLARO
2010-11-17  9:49 ` Paul Mundt
2010-11-17 11:01 ` [PATCH (sh-2.6)] sh: Use GCC __builtin_prefetch() to implement Peppe CAVALLARO
2010-11-18  6:09 ` Paul Mundt [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=20101118060957.GA17539@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.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 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.