From patchwork Thu Jun 18 14:43:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 11612327 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A13B159A for ; Thu, 18 Jun 2020 14:44:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D219020897 for ; Thu, 18 Jun 2020 14:44:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="TF887Y4c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D219020897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 56BBC8D001D; Thu, 18 Jun 2020 10:44:08 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4A4488D0018; Thu, 18 Jun 2020 10:44:08 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36A5B8D001D; Thu, 18 Jun 2020 10:44:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id 09B3F8D0018 for ; Thu, 18 Jun 2020 10:44:08 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C3F0B9F868 for ; Thu, 18 Jun 2020 14:44:07 +0000 (UTC) X-FDA: 76942602534.03.sofa90_230222326e11 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 9222828A4EC for ; Thu, 18 Jun 2020 14:44:07 +0000 (UTC) X-Spam-Summary: 2,0,0,87ee68db881394de,d41d8cd98f00b204,axboe@kernel.dk,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1539:1568:1711:1714:1730:1747:1777:1792:2194:2198:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3865:3867:3870:3871:3872:4321:5007:6261:6653:7875:10004:11026:11658:11914:12043:12296:12438:12517:12519:12555:12895:12986:13069:13161:13229:13311:13357:13894:14181:14384:14394:14721:21080:21324:21444:21451:21627:30054,0,RBL:209.85.216.65:@kernel.dk:.lbl8.mailshell.net-66.100.201.201 62.2.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: sofa90_230222326e11 X-Filterd-Recvd-Size: 3752 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Thu, 18 Jun 2020 14:44:07 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id jz3so2649985pjb.0 for ; Thu, 18 Jun 2020 07:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=kQSBvSrh7q7DQwM3udW0mgxqiTGah8xT/7K+LzTiHfI=; b=TF887Y4cr//mvXhTI5c5VEIRfZElOkM2eJr4igs7tYzM3I8rEROoL5414jXEsJNQ1d 6jCCrNh5fQhPQ07otOWMKTLuwned62gpZzcQSnGz+AtcAsFIRf8kVJYMZrFYkSHJEstI EF+Ln2Q+pUkq3tXurup9X6YD2LWffkOldc8tPFPnSONqddrmM/DgTfaNjc16nR3q5d4t hPjBvp3o4ycBlrYr8QUDl2U7jqa+BlqD3TbE19T3/QnC95yw4ECXM/85GcpiBdM2DbqP 8OM2osLFz5ebGolhbCSR09DpxT7wJ8dhnp+kF1wWM32/wq3hn9RugfvhthZyfIx3RxdO JS+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=kQSBvSrh7q7DQwM3udW0mgxqiTGah8xT/7K+LzTiHfI=; b=MUoDMyMzs7oNZAeaVyzgP5O84TPoWSIlPHfiHv00vTLUjn1TP8t/NwidOZZjn/ss5g VQJ/PW9kqoDcCYjS5RNQpFrJSEeLWSM7ZShtOTrmOgJhpv7YKTmn6A75PVjl5/vbRaR6 cnysdE/J9i1F525t2CGZULKCKSfiAvrcX6WvsQyyyghrdsGOPigP4mhrztuscO/Cdf9T wXe05mvVaSAcEQ3/xwsw7XoRexkGtxza4zBBzR9yifqeTHSbYYRL6EYiIUGzE8L7t/rM YWTJiKEXNCuQF2mguj2qutzlsRQrWYHQfalvGxxyTTX0CSyPIDgvo3N08vkPOaQxzIXu JqOA== X-Gm-Message-State: AOAM533eRFUX04rLcIljR6ZZztnDvvgZnJzG3v2DMJcVPAO8vIVFMwSz RTSRfP7n2qaDwhRHqUaQ2vkkjg== X-Google-Smtp-Source: ABdhPJxFiInSxSM7iPuZuYhM5oN9cIihl9Wh6hIowfIxeUrII9w3vL4Xc8G06h5ebNdfyunElMZGlg== X-Received: by 2002:a17:902:eed1:: with SMTP id h17mr4012771plb.172.1592491446303; Thu, 18 Jun 2020 07:44:06 -0700 (PDT) Received: from x1.localdomain ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id g9sm3127197pfm.151.2020.06.18.07.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 07:44:05 -0700 (PDT) From: Jens Axboe To: io-uring@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, Jens Axboe , Johannes Weiner Subject: [PATCH 05/15] mm: allow read-ahead with IOCB_NOWAIT set Date: Thu, 18 Jun 2020 08:43:45 -0600 Message-Id: <20200618144355.17324-6-axboe@kernel.dk> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618144355.17324-1-axboe@kernel.dk> References: <20200618144355.17324-1-axboe@kernel.dk> Reply-To: "[PATCHSET v7 0/15]"@smtpin03.hostedemail.com, Add@smtpin03.hostedemail.com, support@smtpin03.hostedemail.com, for@smtpin03.hostedemail.com, async@smtpin03.hostedemail.com, buffered@smtpin03.hostedemail.com, reads@smtpin03.hostedemail.com MIME-Version: 1.0 X-Rspamd-Queue-Id: 9222828A4EC X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The read-ahead shouldn't block, so allow it to be done even if IOCB_NOWAIT is set in the kiocb. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe --- mm/filemap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index f0ae9a6308cb..3378d4fca883 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2028,8 +2028,6 @@ 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);