From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Weimer Subject: Re: [PATCH 2/3] mm/filemap: initiate readahead even if IOCB_NOWAIT is set for the I/O Date: Wed, 30 Jan 2019 16:04:36 +0100 Message-ID: <87munii3uj.fsf@oldenburg2.str.redhat.com> References: <20190130124420.1834-1-vbabka@suse.cz> <20190130124420.1834-3-vbabka@suse.cz> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20190130124420.1834-3-vbabka@suse.cz> (Vlastimil Babka's message of "Wed, 30 Jan 2019 13:44:19 +0100") Sender: linux-kernel-owner@vger.kernel.org To: Vlastimil Babka Cc: Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Peter Zijlstra , Greg KH , Jann Horn , Jiri Kosina , Dominique Martinet , Andy Lutomirski , Dave Chinner , Kevin Easton , Matthew Wilcox , Cyril Hrubis , Tejun Heo , "Kirill A . Shutemov" , Daniel Gruss , Jiri Kosina List-Id: linux-api@vger.kernel.org * 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