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=-7.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 30431C433E0 for ; Wed, 24 Jun 2020 16:44:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DEC982073E for ; Wed, 24 Jun 2020 16:44:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="jmm3QQI0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEC982073E 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 3194B6B0007; Wed, 24 Jun 2020 12:44:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CA056B0008; Wed, 24 Jun 2020 12:44:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BAB16B000A; Wed, 24 Jun 2020 12:44:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id 00E146B0007 for ; Wed, 24 Jun 2020 12:44:25 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6ED9CDDE7 for ; Wed, 24 Jun 2020 16:44:25 +0000 (UTC) X-FDA: 76964678490.27.fly14_021055b26e45 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 3FF363D663 for ; Wed, 24 Jun 2020 16:44:25 +0000 (UTC) X-HE-Tag: fly14_021055b26e45 X-Filterd-Recvd-Size: 4783 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 16:44:24 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id a127so1378879pfa.12 for ; Wed, 24 Jun 2020 09:44:24 -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=MTRMKEW0KCXWy44lqufzCQhDf6gXTTb7ZrXSYsufaq0=; b=jmm3QQI0tdZrsdA6jPwTBhaVfQro9QpvXw4CCufatWzxrrgq9DmDpRXOnkQxCLjZRI KAwuijMeZvHEvckvDPNC1uBeztqdngpExlw5CTsvhreUCUUIosB3n+1TvnMGSOiAL9Vu zh21gzSV1Bo0zgLNCJFfjnQjbUkk3E+ftiwQmtYAa/rt0zBszkpsyUAEfa/SMRaPWdeL xArvs8TAnO9nlXUY+zU08Ojl9HicCdCmX6yzHDSEu5iICzDatAS4gkEY5syYt73jtDNW 8t2Wxki7DSAhO9tl7lzWh4jmne6faPgnCDcY4AArMyrrwLXxgcIX/XvZAys54B0mQwaz XiaA== 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=MTRMKEW0KCXWy44lqufzCQhDf6gXTTb7ZrXSYsufaq0=; b=KJmPge8EPYTq6ND5LY89Y3+CR9LADtJPod2WcCk3TJTniBj1FwtSRaUnKxdMUXnlgQ WcMLZmKJg1XLjkH2emb3X8bwFz94kvQQmXRV+8WvI0vpvDgtYWUcRUQPTeG66H3rUyNZ ZYNqCpPoo5b2vkIDTefFCeAmgejpJcei6DFQ1lbwU7zsbtMAYZxPVP43YyM6/h3Vguhg EqkEmFB7Fj+SSdXG0Y1EMWwPUJRQ6VriPGLecFM3uvBr8WqyqLuYt08pwt1hXbBq4KoH SUFb2gJfE4dACUlobgZu3wQleaKW0Z//NjaXU0y4Qc7gM5Oxntuc/cj1FqKexHgaI6zD FYDw== X-Gm-Message-State: AOAM532iekeYAdaq1ybUKeTW/Hvv5wF3u6hkB3imjYR/t80kJ4I+uP45 QixlbLPth3lWavmIA2/mJALqag== X-Google-Smtp-Source: ABdhPJwv+HSOZKZl9Rs6O63Aq5U3yEsp+jpZYYb2Jui24C7D3n7Wz4JIcXL5PtCUVlLAAO5CJkLv8A== X-Received: by 2002:a62:19c4:: with SMTP id 187mr7097299pfz.312.1593017063628; Wed, 24 Jun 2020 09:44:23 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id j10sm12026479pgh.28.2020.06.24.09.44.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2020 09:44:23 -0700 (PDT) Subject: Re: [PATCH 05/15] mm: allow read-ahead with IOCB_NOWAIT set To: Matthew Wilcox 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 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> From: Jens Axboe Message-ID: <8835b6f2-b3c5-c9a0-2119-1fb161cf87dd@kernel.dk> Date: Wed, 24 Jun 2020 10:44:21 -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: <20200624164127.GP21350@casper.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3FF363D663 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 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. -- Jens Axboe