Re: [patch 6/12] hold atomic kmaps across generic_file_read

Daniel Phillips
2002-08-10T18:41:03Z

On Saturday 10 August 2002 20:32, Linus Torvalds wrote:
> On Sat, 10 Aug 2002, Daniel Phillips wrote:
> > I'm sure you're aware there's a lot more you can do with these tricks
> > than just zero-copy read - there's zero-copy write as well, and there
> > are both of the above, except a full pte page at a time. There could
> > even be a file to file copy if there were an interface for it.
>
> The file-to-file copy is really nasty to do, for the simple reason that
> one page really wants to have just one "owner". So while doing a
> file-to-file copy is certainly possible, it tends to imply removing the
> cached page from the source and inserting it into the destination.
>
> Which is the right thing to do for streaming copies, but the _wrong_ thing
> to do if the source is then used again.

If the source is only used for reading it's fine, and you'd know that in
advance if the file is opened r/o.

I will admit that this one is pretty far out there, there is just a ton of
meat and potatoes cleanup work to do before these deathray-type features get
to the top of the stack. But when they do, it's going to be fun.

--
Daniel