Thread (2 messages) 2 messages, 2 authors, 2019-01-30

Re: [PATCH 2/3] mm/filemap: initiate readahead even if IOCB_NOWAIT is set for the I/O

From: Florian Weimer <hidden>
Date: 2019-01-30 15:04:46
Also in: linux-mm, lkml

* Vlastimil Babka:
preadv2(RWF_NOWAIT) can be used to open a side-channel to pagecache
contents, as it reveals metadata about residency of pages in
pagecache.

If preadv2(RWF_NOWAIT) returns immediately, it provides a clear "page
not resident" information, and vice versa.

Close that sidechannel by always initiating readahead on the cache if
we encounter a cache miss for preadv2(RWF_NOWAIT); with that in place,
probing the pagecache residency itself will actually populate the
cache, making the sidechannel useless.
I think this needs to use a different flag because the semantics are so
much different.  If I understand this change correctly, previously,
RWF_NOWAIT essentially avoided any I/O, and now it does not.

Thanks,
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help