Ingo Molnar | 2 Mar 2009 22:25
Picon
Picon
Favicon

Re: [patch] x86, mm: pass in 'total' to __copy_from_user_*nocache()


* Linus Torvalds <torvalds <at> linux-foundation.org> wrote:

> We can play games in the kernel. We do know how many sockets 
> there are. We do know the cache size. We _could_ try to make 
> an educated guess at whether the next user of the data will be 
> DMA or not. So there are unquestionably heuristics we could 
> apply, but I also do suspect that they'd inevitably be pretty 
> arbitrary.

There's a higher-level meta-code argument to consider as well, 
and i find it equally important: finding this rather obvious and 
easy to measure performance regression caused by the 
introduction of MOVNT took us two years.

That's _way_ too long - and adding more heuristics and more 
complexity will just increase this latency. (as we will create 
small niches of special cases with special workloads where we 
might or might not regress)

So, if any such change is done, we can only do it if we have the 
latency of performance-regression-finding on the order of days 
or at most weaks - not years.

	Ingo

Gmane