Re: [NFS] Re: [PATCH] zerocopy NFS for 2.5.36

Andrew Morton (akpm@digeo.com)
Thu, 19 Sep 2002 18:09:34 -0700


Andi Kleen wrote:
>
> Andrew Morton <akpm@digeo.com> writes:
>
> > Hirokazu Takahashi wrote:
> > >
> > > ...
> > > > It needs redoing. These differences are really big, and this
> > > > is the kernel's most expensive function.
> > > >
> > > > A little project for someone.
> > >
> > > OK, if there is nobody who wants to do it I'll do it by myself.
> >
> > That would be fantastic - thanks. This is more a measurement
> > and testing exercise than a coding one. And if those measurements
> > are sufficiently nice (eg: >5%) then a 2.4 backport should be done.
>
> Very interesting IMHO would be to find a heuristic to switch between
> a write combining copy and a cache hot copy. Write combining is good
> for blasting huge amounts of data quickly without killing your caches.
> Cache hot is good for everything else.

I expect that caching userspace and not pagecache would be
a reasonable choice.

> But it'll need hints from the higher level code. e.g. read and write
> could turn on write combining for bigger writes (let's say >8K)
> I discovered that just unconditionally turning it on for all copies
> is not good because it forces data out of cache. But I still have hope
> that it helps for selected copies.

Well if it's a really big read then bypassing the CPU cache on
the userspace-side buffer would make sense.

Can you control the cachability of the memory reads as well?

What restrictions are there on these instructions? Would
they force us to bear the cost of the aligment problem?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/