mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	akpm@osdl.org, hyoshiok@miraclelinux.com
Subject: Re: [PATCH] x86: cache pollution aware __copy_from_user_ll()
Date: 26 Jun 2006 22:26:47 +0200	[thread overview]
Message-ID: <p734py7vf20.fsf@verdi.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0606241218510.6483@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> writes:

> On Sat, 24 Jun 2006, Arjan van de Ven wrote:
> > 
> > while this patch will reduce the number of cycles spent in the kernel,
> > it's just pushing the cache miss to userspace (by virtue of doing a
> > cache flush effectively)... is this really the right thing? The total
> > memory bandwidth will actually increase with this patch if you're
> > unlucky (eg if userspace decides to write to this memory eventually)....
> 
> No. It's for copying _from_ user space, ie a "write()" system call. So 
> what it does is to effectively try to use non-temporal stores to the page 
> cache - since the page cache is usually not read directly afterwards (at 
> least not soon enough for L1 caches to help).
> 
> I don't generally like cache tricks either (caches tend to be better than 
> humans, or at least get there fairly soon), but this one does seem very 
> valid.

Problem is that it will likely wreck pipe and AF_UNIX (= X server) 
performance. These read the buffer quickly again.

If you do something like this it would be better to define
a special function and use it for real FS traffic only.

-Andi

  parent reply	other threads:[~2006-06-26 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200606231501.k5NF1B79002899@hera.kernel.org>
2006-06-24 14:42 ` Arjan van de Ven
2006-06-24 17:39   ` Dave Jones
2006-06-24 19:21   ` Linus Torvalds
2006-06-24 19:32     ` Arjan van de Ven
2006-06-26 20:26     ` Andi Kleen [this message]
2006-06-26 20:31       ` Linus Torvalds

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=p734py7vf20.fsf@verdi.suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=hyoshiok@miraclelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®