Re: allowed pages in the block later, was Re: [Ext2-devel] [PATCH]ext3: avoid sending down non-refcounted pages

From: Arjan van de Ven
Date: Sun Dec 11 2005 - 03:43:30 EST


On Sat, 2005-12-10 at 16:47 -0800, Andrew Morton wrote:
> Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> >
> > The problem we're trying to solve here is how do implement network block
> > devices (nbd, iscsi) efficiently. The zero copy codepath in the networking
> > layer does need to grab additional references to pages. So to use sendpage
> > we need a refcountable page. pages used by the slab allocator are not
> > normally refcounted so try to do get_page/pub_page on them will break.
>
> I don't get it. Doing get_page/put_page on a slab-allocated page should do
> the right thing?

but it doesn't stop the kfree from freeing the memory; zero copy needs
the content of the memory to stay around afterwards, eg it wants to
delay the kfree until the data is over the wire, which is an
asynchronous event versus the actual send command in a zero-copy
situation.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/