From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 183F0C433E0 for ; Wed, 24 Jun 2020 16:41:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AA5592073E for ; Wed, 24 Jun 2020 16:41:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cvmnF7vn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA5592073E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 05BAF6B0007; Wed, 24 Jun 2020 12:41:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F00436B000A; Wed, 24 Jun 2020 12:41:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DCA036B000C; Wed, 24 Jun 2020 12:41:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id BF6FD6B0008 for ; Wed, 24 Jun 2020 12:41:41 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7AD72824556B for ; Wed, 24 Jun 2020 16:41:41 +0000 (UTC) X-FDA: 76964671602.18.waste16_3d0c99526e45 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 0B97C100553E6 for ; Wed, 24 Jun 2020 16:41:41 +0000 (UTC) X-HE-Tag: waste16_3d0c99526e45 X-Filterd-Recvd-Size: 2922 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 16:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3Etw+K+6vqw9KKAT/39I8buBhiRfi5hNZ+5u7BKhPD4=; b=cvmnF7vn1ntzO5VbxZbl+Utgf0 mpk9G0MYcK7vr7ci/NRGgSneoMnuk59gLm3YYAiv/JRes+kLGAgRy0wm66oc9gO+7OpzdJ+2udx8A tqRrdNVtb/Fh7vD2uISBCKPFEq3BzKKnuXrd2/neFwWqiSp7S7Fs3s3Wxc/asz/lHMUTSryPdrd3v /ASFRsu87FCoqnT+aAhYgzHtmnP+QBV3tOdXxO+gDr6Sl0u5JL03O1fuzP4Faa5MfEmZOKWBuRd/e K6UhTxLzMFpnVf0AgK7SGfdDxL1syq+Lw1VKrJ1eql9UEcpCYqz5aXV4EFr6BZ0VsQsFEkpxt3Mre slXoaTEw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo8Sl-0007VG-Sk; Wed, 24 Jun 2020 16:41:27 +0000 Date: Wed, 24 Jun 2020 17:41:27 +0100 From: Matthew Wilcox To: Jens Axboe Cc: Dave Chinner , io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, Johannes Weiner Subject: Re: [PATCH 05/15] mm: allow read-ahead with IOCB_NOWAIT set Message-ID: <20200624164127.GP21350@casper.infradead.org> References: <20200618144355.17324-1-axboe@kernel.dk> <20200618144355.17324-6-axboe@kernel.dk> <20200624010253.GB5369@dread.disaster.area> <20200624014645.GJ21350@casper.infradead.org> <70b0427c-7303-8f45-48bd-caa0562a2951@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70b0427c-7303-8f45-48bd-caa0562a2951@kernel.dk> X-Rspamd-Queue-Id: 0B97C100553E6 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: On Wed, Jun 24, 2020 at 09:35:19AM -0600, Jens Axboe wrote: > On 6/24/20 9:00 AM, Jens Axboe wrote: > > On 6/23/20 7:46 PM, Matthew Wilcox wrote: > >> I'd be quite happy to add a gfp_t to struct readahead_control. > >> The other thing I've been looking into for other reasons is adding > >> a memalloc_nowait_{save,restore}, which would avoid passing down > >> the gfp_t. > > > > That was my first thought, having the memalloc_foo_save/restore for > > this. I don't think adding a gfp_t to readahead_control is going > > to be super useful, seems like the kind of thing that should be > > non-blocking by default. > > We're already doing memalloc_nofs_save/restore in > page_cache_readahead_unbounded(), so I think all we need is to just do a > noio dance in generic_file_buffered_read() and that should be enough. I think we can still sleep though, right? I was thinking more like this: http://git.infradead.org/users/willy/linux.git/shortlog/refs/heads/memalloc