Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5996041imu; Wed, 30 Jan 2019 07:06:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN7EH1YnTqgpXEleGxrIXRKt8GRRdmjhcxgnG2HQvUlFRmNxUQ+KO2CkbZ+779KsPgGk0uM5 X-Received: by 2002:a62:c583:: with SMTP id j125mr31094064pfg.37.1548860810972; Wed, 30 Jan 2019 07:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548860810; cv=none; d=google.com; s=arc-20160816; b=rDaVZi1sOsS0hJhIiQvz+YsNWgP0YrYClaGvM9fD3puagTSBidxs6uHpP97hbC33FP YMhtfM/dFD71OqE4EiIWzxFNkxsPjWVLNP89Fqu46IY6KNE9UIYV+fo4X/is/k3sx1KI zpYKLgz4MlhDcp3onpHfbBCQdCKs1YO05goyyv3vUlLBM2m3E3OCdc0qU1GU1mBiVjNC /fYl0StSS3n6kIMJbKXpqlBI298mWU2QNvBEFmVhq+D5RTDvn78NV59xpJYhNIle+Bo4 lv9nCS52FQeRrbkm7+ukVkpuLtn8j76dLDXRLYDV8S/lNYaIOi13abw8WK3BsEiMSA+g tBSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=RFHJCwGGFjug4k/yqoI/yFl11Q86KTQkVM3Lko7swq0=; b=kN9tjzsUMm0a4dhgUDB924JahgsN1o1r06yl/6pi6k3cRFjw18QpNkAHhVZFCT7g1I lPFqHG/xlKVGb/yyeLeXuBi0pHgCoM8MsUDWzg2+i+o1Yvsr8Oy8xL6VUmKXY4Os/X2D iRXRuxKfTrsOT1LBevXDJ7p6LD8aXF/GPa5wEZ+hm/PAaMBl41wvf7hE54xIFz0kN2xj upqrhcfLYN0SiHeI2ofDz7NPYZ5HByXHj10KIG/W3rtvtXiRmTHi0uF/OD5gYvxJIQQ+ B6IYwoc4RfBAro9P9cASqWXBHR2VUie9BTeNiVXqBAc1gKYXRBCS2EfwmwEmYWnhjufL YVaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si1704533pls.73.2019.01.30.07.06.31; Wed, 30 Jan 2019 07:06:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731342AbfA3PEp (ORCPT + 99 others); Wed, 30 Jan 2019 10:04:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60616 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727162AbfA3PEo (ORCPT ); Wed, 30 Jan 2019 10:04:44 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1761D155E0; Wed, 30 Jan 2019 15:04:43 +0000 (UTC) Received: from oldenburg2.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D198D100164E; Wed, 30 Jan 2019 15:04:37 +0000 (UTC) From: Florian Weimer 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 Subject: Re: [PATCH 2/3] mm/filemap: initiate readahead even if IOCB_NOWAIT is set for the I/O References: <20190130124420.1834-1-vbabka@suse.cz> <20190130124420.1834-3-vbabka@suse.cz> Date: Wed, 30 Jan 2019 16:04:36 +0100 In-Reply-To: <20190130124420.1834-3-vbabka@suse.cz> (Vlastimil Babka's message of "Wed, 30 Jan 2019 13:44:19 +0100") Message-ID: <87munii3uj.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 30 Jan 2019 15:04:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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