lkml.org 
[lkml]   [2009]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] x86, mm: pass in 'total' to __copy_from_user_*nocache()


On Sat, 28 Feb 2009, Ingo Molnar wrote:
>
> OTOH, given how draconian non-temporal stores are, i'm leaning
> towards removing them from the x86 code altogether. If it matter
> to performance somewhere it can be reintroduced, based on really
> well backed up numbers.

It would be interesting to see if we could instead base the decision on
what we really do care about, namely going to do IO.

And the thing is, in this path we _do_ kind of know that. The caller
(normally generic_perform_write) already does that whole
balance_dirty_pages_ratelimited() thing.

So rather than passing in the "total_size" thing, we _could_ pass in
something that is based on

- are we O_DIRECT? If so: use uncached
- perhaps: are we really _really_ large? If so: use uncached, we know the
caches aren't going to capture it.
- are we starting writeout due to dirty page balancing: if so, use
uncached.

so we could just add a "nocached" flag to that whole
__copy_from_user[_inatomic]_nocache thing, and we could make
balance_dirty_pages_ratelimited() return a flag satung whether we're
starting write-out or not.

Of course, the dirty writeout will always happen to _old_ pages, so we'll
actually get notified too late, but assuming you have some steady state
"heavy IO", it would presumably still be a reasonable heuristic.

But on the other hand, I could personally certainly also imagine just not
doing that whole uncached thing at all. Myself, I tend to care about the
peformance of the cached case much more than some odd iozone thing. But
others will have different priorities..

Linus


\
 
 \ /
  Last update: 2009-02-28 19:55    [W:0.068 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site