Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1088666ybt; Tue, 7 Jul 2020 07:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9Zu+AZU90ZxbNV11emFySJwP6Hd/M5madelZAyH4bMAL+vKNytczVqfWkmJeAOIpLOQg8 X-Received: by 2002:a17:906:19c9:: with SMTP id h9mr45881844ejd.526.1594132407631; Tue, 07 Jul 2020 07:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594132407; cv=none; d=google.com; s=arc-20160816; b=XhBHvN3FeJ1JwLhR06rmgoAhqQFYIt8+P+8n6kiCFN+JXSy3pU3Nf8mQHaRyxrDFCS xWBValRJ/NjqtVLzfUVa7eP+ZJOLVULUTJ4nBmu1AHQRASLAspPKKW9fiXx7XSj/tu4r IZkGUp92Q+K1tnIDSmhkyBuX+fDWGp5bpABvITRZW/mgyyLUk9rcGqbFuAXEzKoivlSB 4UOAjIyCI6+ECO+diAQs7PAKOgwNRT7rF4Utd4QbP6rfIASOxk4HaBjbMoNVgGJAcaZC mNcuXjFQpbZyPgq+LjWe561T6p0PLm5tQEY6TA10xBxXFF65eihN7bK2VJk6eXmBLpiN pRqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=K9wtGrRmm/8ioPgsuW/ScKzBbF1VAv0JgQlxPuaeZjA=; b=BS4NqwakWWOTrsBt1xMmrGE615JM1jUcMAdRMGNSlay87rzmBE2ywPMSM8x2F5douN zsCMilXi6tXvexY7lRNntSaelx/ML3ei6lzbIGm2dzRskqJBtcWzZ/X7R2fGA6Tdunzg RnN1kFJ9JI5/CxuZHkwONpBz2OgLIcHjW1R7symmdPWmaWpNnuX3pas2wA7Ug5TcwNlO ak4KVQvLbQRm1aetq0anDjKxzXjR4MfEXbJE3C9wXAH0hDHY+Lppn7nVRWdm0CzPkPZb AfeOx76eOD5UGIPQwpHQH1UNq6osBDIBoPXRCN47wmZUB9pBNzyZHSMygKiyXw12wOwQ hhoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=JGTzfnCq; 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 j8si15652257edy.211.2020.07.07.07.33.04; Tue, 07 Jul 2020 07:33:27 -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=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=JGTzfnCq; 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 S1727793AbgGGOcC (ORCPT + 99 others); Tue, 7 Jul 2020 10:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgGGOcC (ORCPT ); Tue, 7 Jul 2020 10:32:02 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32955C061755 for ; Tue, 7 Jul 2020 07:32:02 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id a12so43400740ion.13 for ; Tue, 07 Jul 2020 07:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=K9wtGrRmm/8ioPgsuW/ScKzBbF1VAv0JgQlxPuaeZjA=; b=JGTzfnCq2nLpWgT0i7AllodECtqIXc0lJai/AdmQNrYkIOD+LRzHS62If436OjZZ3y gz7dHtnAhIElDndYwbPYyOpuDSH5GBd1lLBu+mL2tIY6ACa6KkahSdPTT3meGSRzwu3m 8QUYEGRFeuLy2VcuM6yGDL7mJsQqncBHsTwuuWbTXerN0cEGb0mJz72UJItyM9bOwI8j ikQNiuc6d5gMEHhSVqb7alcfRt+DtPS++HhgDfhX/VUmJGPByXmQ08e8+M7nV19M425K xU7PDUIhdH/MJn7F07/L4BHgx/xR9sC46PGo26+B4ZYGbMw7rFzNXV/zrK3oGsXJ9wNy W+8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=K9wtGrRmm/8ioPgsuW/ScKzBbF1VAv0JgQlxPuaeZjA=; b=gLPEJWnXJqhq4OFLPAcn0lh8+D1ddH7zrgCte4dzFNDcemTTUdmhypYZA06NC85ljR 92nxF8qvYy3lr9v76d7s5Jo4s8aIoT+6frDLXskHkbLywvQDanBsjJwrzgK2z1HRmQmG 1F57GYaoLZvCkke6lI4O1sUOCVGC2gVMAwYbO5OHBxAmxA3m7FNrpQFuY2+V4EFAEuzf tKPtoF83mcbvWsge9hLbpEULXOlL5oUrAb2Dz+3UnYdoWD7rCTjngic0vFISm7Hce4C7 Bd/RH3C4/A4qRn0UiD9O5PIFog5clTTu9es5uo2FW6qUsKG7dQA3IpETOQIpNMnlYYQ+ Dovw== X-Gm-Message-State: AOAM533T6h26sgYKl4pVKwWY3adXV/YcNTh4t10JbcY55nDAhO7MGmhp jlnxue0vrarHDAGyeY5V6JRbjoPQxT1dGA== X-Received: by 2002:a05:6602:5db:: with SMTP id w27mr31920956iox.58.1594132320139; Tue, 07 Jul 2020 07:32:00 -0700 (PDT) Received: from [192.168.1.58] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id l10sm12956943ilc.52.2020.07.07.07.31.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jul 2020 07:31:59 -0700 (PDT) Subject: Re: [PATCH 05/15] mm: allow read-ahead with IOCB_NOWAIT set To: =?UTF-8?Q?Andreas_Gr=c3=bcnbacher?= Cc: Matthew Wilcox , Dave Chinner , io-uring@vger.kernel.org, Linux FS-devel Mailing List , Linux Kernel Mailing List , Linux-MM , Andrew Morton , Johannes Weiner 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> <20200624164127.GP21350@casper.infradead.org> <8835b6f2-b3c5-c9a0-2119-1fb161cf87dd@kernel.dk> From: Jens Axboe Message-ID: Date: Tue, 7 Jul 2020 08:31:58 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/7/20 5:38 AM, Andreas Grünbacher wrote: > Am Mi., 24. Juni 2020 um 18:48 Uhr schrieb Jens Axboe : >> >> On 6/24/20 10:41 AM, Matthew Wilcox wrote: >>> 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 >> >> Yeah, that's probably better. How do we want to handle this? I've already >> got the other bits queued up. I can either add them to the series, or >> pull a branch that'll go into Linus as well. > > Also note my conflicting patch that introduces a IOCB_NOIO flag for > fixing a gfs2 regression: > > https://lore.kernel.org/linux-fsdevel/20200703095325.1491832-2-agruenba@redhat.com/ Yeah I noticed, pretty easy to resolve though. -- Jens Axboe