[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090224161329.GA26299@elte.hu>
Date: Tue, 24 Feb 2009 17:13:29 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andi Kleen <andi@...stfloor.org>
Cc: Salman Qazi <sqazi@...gle.com>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: Performance regression in write() syscall
* Andi Kleen <andi@...stfloor.org> wrote:
> On Mon, Feb 23, 2009 at 06:03:04PM -0800, Salman Qazi wrote:
> > - return __copy_user_nocache(dst, src, size, 1);
> > + if (likely(size >= PAGE_SIZE))
> > + return __copy_user_nocache(dst, src, size, 1);
> > + else
> > + return __copy_from_user(dst, src, size);
>
> I think you disabled it completely, the kernel never really
> does any copies larger than page size because all its internal
> objects are page sized only.
No, look again, it's not disabled completely - the check now
basically special-cases 4K writes _only_, and makes them
non-temporal. That still covers the big/midsize file case.
And that kind of 4K limit makes a lot of sense. A small file
write will unlikely to have a perfect 4K sized copy. Big file
writes (and raw/direct IO related copies, etc.) will be chunked
down to 4K sized units.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists