Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-05-01 Thread Andrew Morton
On Tue, 1 May 2007 20:58:02 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Tue, 1 May 2007, Nate Diller wrote: > > > well, leave it to me to reply too quickly, sorry. i think we should > > leave simple_prepare_write() the way it is, since it's a library > > function itself. the

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-05-01 Thread Christoph Lameter
On Tue, 1 May 2007, Nate Diller wrote: > well, leave it to me to reply too quickly, sorry. i think we should > leave simple_prepare_write() the way it is, since it's a library > function itself. the other two callsites in your patch are buffers, > which may themselves be smaller than a page so y

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-05-01 Thread Nate Diller
On 5/1/07, Nate Diller <[EMAIL PROTECTED]> wrote: On 5/1/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Tue, 1 May 2007, Andrew Morton wrote: > > > As Satyam said, this will sometimes cause us to map and unmap the page > > twice, and to run flush_dcache_page() twice. In not-terribly-uncom

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-05-01 Thread Nate Diller
On 5/1/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: On Tue, 1 May 2007, Andrew Morton wrote: > As Satyam said, this will sometimes cause us to map and unmap the page > twice, and to run flush_dcache_page() twice. In not-terribly-uncommon > circumstances in very frequently called functions.

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-05-01 Thread Christoph Lameter
On Tue, 1 May 2007, Andrew Morton wrote: > As Satyam said, this will sometimes cause us to map and unmap the page > twice, and to run flush_dcache_page() twice. In not-terribly-uncommon > circumstances in very frequently called functions. > > Doesn't seem worth it to me. Ok but we have that cod

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-05-01 Thread Andrew Morton
On Mon, 30 Apr 2007 00:04:31 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > > Replace open-coded kmap_atomic() and kunmap_atomic() > surrounding two memory clear operations with zero_user_page(), as both > memory operations act on the same page. > > Cc: Nate Diller <[EMAIL PROTECTED]

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-04-30 Thread Christoph Lameter
On Mon, 30 Apr 2007, Satyam Sharma wrote: > A simple "Replace open-coded kmap_atomic() and kunmap_atomic() > surrounding two memory clear operations with zero_user_page(), as both > memory operations act on the same page" would have been better. Ok. > Perhaps you were more worried with the addit

Re: [PATCH] zero_user_page uses in fs/buffer.c and fs/libfs.c

2007-04-29 Thread Satyam Sharma
On 4/30/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: There are a couple of places where kmap_atomic is surrounding two memory operations. Usually only one of them is performed. So it is possible to also use zero_user_page there. I do like the patch, but would prefer if you'd give a better/c