Re: [PATCH][RFC] splice support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jens,

Looks nice!

Jens Axboe wrote:

Hi,

Since my initial posting back in December, I've had some private queries
about the state of splice support. The state was pretty much that it was
a little broken, if one attempted to do file | file splicing. The
original patch migrated pages from one file to another in this case,
which got vm ugly really quickly. And it wasn't always the right thing
to do, since it would mean that splicing file1 to file2 would move
file1's page cache to file2. Sometimes this is what you want, sometimes
it is

Page migration now generalised vmscan.c and introduced remove_mapping
function, which should help keep things clean.

Moving a page onto and off the LRU is an interesting problem, though.
But possibly you could just leave it on the LRU and transfer the pagecache
reference over to the pipe. vmscan would find extra pages on the LRU at
times, but they would go away when pipe releases the page.

Moving a page from a pipe to a filesystem might be harder, because you
don't know if it came from a filesystem (still on LRU) or not (in which
case you need to add it to LRU). If only you can keep track of this
information as the page gets passed around... hmm the PG_private will be
free to use because a filesystem must always drop its buffers before
remove_mapping can run. One would also need to take care of replacing
an existing page I guess.

Hmm... I think it can work, falling back to copies if we get stuck
anywhere.

Unless someone beats me to it, I'll try coding something up when I get
a bit more free time.

--

Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux