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

Hiro Yoshioka
2005-08-18T11:06:41Z

On 16 Aug 2005 15:15:35 +0200, Andi Kleen <ak@suse.de> wrote:
> However it disables preemption, which especially for bigger
> copies will probably make the low latency people unhappy.

In the copy loop,
+#ifdef CONFIG_PREEMPT
+ if ( (i%64)==0 ) {
+ MMX_RESTORE;
+ MMX_SAVE;
+ };
+#endif

It costs several hundred clocks (wow) every 4KB copy.

It kills throughput but it makes the low latency people smile.

So I make two APIs.
__copy_user_zeroing_nocache()
__copy_user_zeroing_inatomic_nocache()

The former is a low latency version and the other is a throughput version.

What do you think?

Regards,
Hiro

--
Hiro Yoshioka
mailto:hyoshiok at miraclelinux.com