Re: [PATCH] x86: cache pollution aware __copy_from_user_ll()



On Sat, Jun 24, 2006 at 04:42:32PM +0200, Arjan van de Ven wrote:
On Fri, 2006-06-23 at 15:01 +0000, Linux Kernel Mailing List wrote:
commit c22ce143d15eb288543fe9873e1c5ac1c01b69a1
tree dc7d457b8952fc50dfc90df659b35de4117c61fc
parent 7dbdf43cfa635ddc3701cc8d1eab07597cd731c0
author Hiro Yoshioka <hyoshiok@xxxxxxxxxxxxxxxx> Fri, 23 Jun 2006 16:04:16 -0700
committer Linus Torvalds <torvalds@xxxxxxxxxxx> Fri, 23 Jun 2006 21:42:56 -0700

[PATCH] x86: cache pollution aware __copy_from_user_ll()

Use the x86 cache-bypassing copy instructions for copy_from_user().

Some performance data are

Total of GLOBAL_POWER_EVENTS (CPU cycle samples)

2.6.12.4.orig 1921587
2.6.12.4.nt 1599424
1599424/1921587=83.23% (16.77% reduction)

Hi,

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)....

But this is a copy _from_ userspace. The userspace app has likely already
brought it into cache before we do the __copy_from_user_ll

Dave

--
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] x86: cache pollution aware __copy_from_user_ll()
    ... Total of GLOBAL_POWER_EVENTS (CPU cycle samples) ... cache flush effectively)... ... memory bandwidth will actually increase with this patch if you're ... unlucky (eg if userspace decides to write to this memory eventually).... ...
    (Linux-Kernel)
  • Re: [PATCH] x86: cache pollution aware __copy_from_user_ll()
    ... while this patch will reduce the number of cycles spent in the kernel, ... cache flush effectively)... ... memory bandwidth will actually increase with this patch if you're ... unlucky (eg if userspace decides to write to this memory eventually).... ...
    (Linux-Kernel)