mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: akpm@osdl.org, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/slab.c : prefetchw the start of new allocated objects
Date: Sat, 30 Jul 2005 12:31:25 -0700 (PDT)	[thread overview]
Message-ID: <20050730.123125.71116248.davem@davemloft.net> (raw)
In-Reply-To: <42E9F145.7040302@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 29 Jul 2005 11:05:09 +0200

> Some CPU lacks a prefetchw() and currently do nothing, so I ask this
> question : Should'nt make prefetchw() do at least a prefetch() ? A
> read hint is better than nothing.

This is not true, especially on SMP.  If the only prefetch variant
available does a "prefetch for read", the cpu will only grab the
cacheline in shared state if other cpus have a dirty copy.

And, as a result, when the write to the cache line occurs yet
another bus transaction will go out in order to get exclusive
access to the cache line on the local cpu.  This is extremely
inefficient.

So it's better in this case to make no prefetch, and thus only
incur one bus transaction when the memory access occurs.

  parent reply	other threads:[~2005-07-30 19:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 23:35 2.6.12 sound problem Stephen Clark
2005-07-27  4:23 ` Lee Revell
2005-07-27 15:31   ` Stephen Clark
2005-07-27  8:26 ` Takashi Iwai
2005-07-27 15:31   ` Stephen Clark
2005-07-29  8:41     ` Andrew Morton
2005-07-29  9:05       ` [PATCH] mm/slab.c : prefetchw the start of new allocated objects Eric Dumazet
2005-07-29  9:17         ` Andrew Morton
2005-07-29 10:08         ` Ingo Molnar
2005-07-30 19:31         ` David S. Miller [this message]
2005-07-30  3:13       ` 2.6.12 sound problem Stephen Clark
2005-07-30 15:56         ` Stephen Clark
2005-07-31 19:25           ` 2.6.13rc4 hang Stephen Clark
2005-08-01 13:11           ` Stephen Clark

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=20050730.123125.71116248.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@osdl.org \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

Powered by JetHome