Re: [RFC] [PATCH] splice: add ->splice_read support for /dev/zero

From: Octavian Purdila
Date: Tue Aug 19 2008 - 05:10:52 EST


From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Aug 2008 21:43:18 -0700

> > Preallocating the zero page is simpler and faster with the relatively
> > small (?) drawback of using an extra page of memory.
>
> How much faster is it? What workloads/benchmarks/etc?
>

I should have said "theoretically faster" :)

I did not perform any tests, but, did I assumed correctly that it is going to
be faster preallocating it then allocating it in every splice call?

> > Maybe when CONFIG_EMBEDED is selected we can switch to dynamically
> > allocating the page?
>
> One more page won't kill us. People might want one-page-per-node, too.
> But that all depends on what the benefits and applications of this are..

Its the reverse of splice for /dev/null. Sometimes you don't care of the data
pushed through the socket (e.g. protocol payload in networking testing).

BTW, the patch its buggy, I'll send a new version for linux-next if you decide
its worth it.

Thanks,
tavi

--
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/