Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp727705ybt; Wed, 24 Jun 2020 09:44:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzTIdqa8g1/FAMyzTJeV2jkO+Wmfd2Ek27G2wdji10zV739cPlrdqTwQxAayGlAUq3hzxH X-Received: by 2002:a05:6402:31ba:: with SMTP id dj26mr16592746edb.121.1593017087065; Wed, 24 Jun 2020 09:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593017087; cv=none; d=google.com; s=arc-20160816; b=kEyBpIJ9850Gsvr3/LMrtA+X41UpRLhmSQmH+0FJc6q6M+HJ9yyIzfAKS7nRn0ROap yqpak/YYIzI+lVipIiEILlTOmi1dmAQgehd9tNSJCQJlKEfbQ/Pwukh5kdWkH/5BHPNi FnolrqXQByi74CT6iVAqaMi31yKKqKOim/lQcgda/kF/XCu9qylYSDkQz8up7XmP6qxS lGcmpI8FVtCs2wuy5I09xm1NT6dDyuZceQZTdi9bXpVzvOvjhChqGhgP5glisK+BjKDW Y4XtK7BgkLKpHRnE16bSby0ch9pdp+x37z6tiBBDpGhzekAzREkmlhLm6hv8p2IS/0X9 ewqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3Etw+K+6vqw9KKAT/39I8buBhiRfi5hNZ+5u7BKhPD4=; b=yptk4XB0nbtUFn7mCDQgPSDWeEyZdbhV9zpUDzQAbCXW15nsUDbQSIUJW8DcMQ4bsn /azKuaDoPnJq24TsfqWMhmoR5yonvGK9ZPjoxKfgcDT1m1pqx/YxgYO2mQW1NNjf7ahE 2dHYSUXLDcD1I80gpKJkXD8Y/NwHkV3m8nH7XJO0VbY/16uJcLOjKeRmwU5ZRpyF9UBR /eLPZDe8tOklK2k33sU+is+6rB2PPGe7Kc00GieZqDSVNbzNzi9ytqTS2E4mthDtyF7k +WDN4c3QAh3vn2UfxQghyNa7VtsLsLdItofPQGog4W0BP+c2YrkG3jevW8K3ShlpCmvu KXdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=cvmnF7vn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lb19si12614469ejb.295.2020.06.24.09.44.23; Wed, 24 Jun 2020 09:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=cvmnF7vn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405170AbgFXQlq (ORCPT + 99 others); Wed, 24 Jun 2020 12:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404160AbgFXQlq (ORCPT ); Wed, 24 Jun 2020 12:41:46 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 448A1C061573; Wed, 24 Jun 2020 09:41:46 -0700 (PDT) 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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