Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6944829imu; Thu, 31 Jan 2019 02:16:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Gty/PxHybDBYP4bH28i0NELxDSRVxpO2Boe9duUsWV9hza7yACZTO34RSrjd5dNfyeu8Z X-Received: by 2002:a63:c0f:: with SMTP id b15mr31189963pgl.314.1548929766030; Thu, 31 Jan 2019 02:16:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548929766; cv=none; d=google.com; s=arc-20160816; b=ru8ID6phwmegrwSXQ8oV3lCT9k587oOBSjqXPAe13RBvy4KVw/XVRQZRRHX5xACZVD 3CSz8NMt5k1T/DHa3kaI3VLjlT0KRir8g2JG1K7GOXBNrfbMYNNG/a2SlgnHRFfKiW8f OK/22I4FO8i2fQ6FkNI2OnmikTT/agcsnXmyZv76HICjwfpHdqSgKQcjWemU7kvT7Beh oArpNg/IHJhS7r4hHFY+yFPQUe5sat3IIKEKOcrYu/G6t4/GSGV9pHpnLh1X7puHbPt0 zpJpkOFvG3pupe41C3FNUJTf7MCi0aPgko2MCuQF4O/3bqLLiDWTyDIZx+O+QL6jyBe4 VFjw== 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:references :message-id:in-reply-to:subject:cc:to:from:date; bh=q44yXp2qtyMLV0reBS5F6bb3hI7xFpLPdhkhjxqtFv8=; b=qK0odlkjVt5aYaa+sXqh0AebwGnM4jjFWfG6yjDqjpCDSrE5Rcwi1799ylX2BQh+Rr K6lnE/CxIhZ1XMI95GJ87UgHuVggVKhYHpq/SJ7vMnhcsfl3ZSjEQeUzhWTWLBVz3108 U7LnG8TOupYF+fas2jNvMegRD8mA07wRpvhS59Zf8pQKLNnP709XYKs0GMWBbWauMfjv nYyhv7a0AIuF5/OxpSBEI9hhWTfLnMqyW0O5kaOecNCruqn4XN8j6C4sFa3ZxeOrOX/a RTKx9jsp3Wbw0g7xgdCSHPtlYXQX10W3iIiOzOkcT00xBW0SaBHlbaMpdDVgza/+E5nr 0cKQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si4031357pgm.81.2019.01.31.02.15.50; Thu, 31 Jan 2019 02:16:06 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732021AbfAaKPb (ORCPT + 99 others); Thu, 31 Jan 2019 05:15:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:51392 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726368AbfAaKPb (ORCPT ); Thu, 31 Jan 2019 05:15:31 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7BF68B010; Thu, 31 Jan 2019 10:15:29 +0000 (UTC) Date: Thu, 31 Jan 2019 11:15:28 +0100 (CET) From: Jiri Kosina To: Michal Hocko cc: Vlastimil Babka , Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Peter Zijlstra , Greg KH , Jann Horn , Dominique Martinet , Andy Lutomirski , Dave Chinner , Kevin Easton , Matthew Wilcox , Cyril Hrubis , Tejun Heo , "Kirill A . Shutemov" , Daniel Gruss , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/3] mm/filemap: initiate readahead even if IOCB_NOWAIT is set for the I/O In-Reply-To: <20190131095644.GR18811@dhcp22.suse.cz> Message-ID: References: <20190130124420.1834-1-vbabka@suse.cz> <20190130124420.1834-3-vbabka@suse.cz> <20190131095644.GR18811@dhcp22.suse.cz> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 Jan 2019, Michal Hocko wrote: > > diff --git a/mm/filemap.c b/mm/filemap.c > > index 9f5e323e883e..7bcdd36e629d 100644 > > --- a/mm/filemap.c > > +++ b/mm/filemap.c > > @@ -2075,8 +2075,6 @@ static ssize_t generic_file_buffered_read(struct kiocb *iocb, > > > > page = find_get_page(mapping, index); > > if (!page) { > > - if (iocb->ki_flags & IOCB_NOWAIT) > > - goto would_block; > > page_cache_sync_readahead(mapping, > > ra, filp, > > index, last_index - index); > > Maybe a stupid question but I am not really familiar with this path but > what exactly does prevent a sync read down page_cache_sync_readahead > path? page_cache_sync_readahead() only submits the read ahead request(s), it doesn't wait for it to finish. -- Jiri Kosina SUSE Labs