Re: read()/readv() only from page cache

From: Volker Lendecke
Date: Sun Sep 07 2014 - 17:01:12 EST


On Fri, Sep 05, 2014 at 12:27:21PM -0400, Milosz Tanski wrote:
> In a VLDB like workload this would enable me to lower the latency of
> common fast requests and. By fast requests I mean ones that do not
> require much data, the data is cached, or there's a predictable read
> pattern (read-ahead). Obviously it would be at the expense of the
> latency of large/slow requests (they have to make 2 read calls, the
> first one always EWOULDBLOCK) ... but in that case it doesn't matter
> since the time to do actual IO would trump any kind of extra latency.

That was my thinking as well when I discussed it with Christoph. Sorry
for not getting around to actually test his patch. Samba right
now uses a thread pool for aio, we get parallel read requests from
clients over a single TCP connection and we need to keep all disks busy
simultaneously. We'd like to avoid the thread overhead when it's not
necessary because the data is already around. A per-request flag would
fit Samba better than a flag settable by fcntl in this pattern. Samba
can't easily open a file twice (once with NONBLOCK and once without).

Volker

--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt@xxxxxxxxx
--
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/