Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8448258rwl; Tue, 10 Jan 2023 13:49:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXtK/L9gh2hu28b/bPZmwRJz/0oPPnO1fqvh6SmdE3c9N+JpYt22DH7A3EPb1Wwr+oG/PGIl X-Received: by 2002:a05:6a00:1d9d:b0:566:900d:5af2 with SMTP id z29-20020a056a001d9d00b00566900d5af2mr70242307pfw.34.1673387365102; Tue, 10 Jan 2023 13:49:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673387365; cv=none; d=google.com; s=arc-20160816; b=XCE35QDzHb6pmxwU3j2tyEX3qSRlFCesCbqG+u3PmKSrRHN7SbiHAG9qAgJfocncnt lpMUJXmGOw1iSPq5/QyA5yCtNkS8N91LBNTjETk1JuCPdn1N/AJJp8vKK+XsuYgbcNoj e/tqDd6UKM4gfkd/SXxEvpQH/z5Kr4R7/Hcyfns2BfSdLtM266stfbUsrfT0kJUBIAn7 lxwbl5su9ueQUo3PoW03b+838qS1RKCyXV9EagagQZY46ek97+JlCHohbDK242GoJ/aC b/+NzBO5b7r25IRwPRh8MA5UTmYjtqTw2RuJDNhYFW3FBuJzFhqVH6+yrs5fVFJHoMeb ATWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=D6WnFAop7d5E0yhy9sgHCW9UOo46MAfDHRFM7/8uo+E=; b=Y8ca2uGvqAK3nb57T6ft1cNq5yYK+zC0e2mZHfx8UBcoeTPTw9Mf7QqHlave7g6hwE JUqrf5V1Vgq9xEiqL9gX3RJ0UXCv+eFdsOAToRLwaup9UlSxVo+gYbK4dio6vl+3ruUA jZ8g4TfOelmEwIzfs3yrjSLUTj4RJw2st4kNvLRNwuYY3uXAZrZOF+aisVMvyx7+QW8N zUGzSU+BX+Vy7GiYvWphAh/rMKyeL+4Iioal18uv9k9G8jHMys/WB6fxQHT+kia8FWFk mQAHHGtUelhVb4/v/d3mG5UbeaJak3EFzQZfmhTbtdSAs/h2RLVXN4gpb/MFVVqnl11P hxsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=KJo+O1YH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a056a00084700b00574a6ee885dsi13173627pfk.3.2023.01.10.13.49.18; Tue, 10 Jan 2023 13:49:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=KJo+O1YH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232746AbjAJVmA (ORCPT + 53 others); Tue, 10 Jan 2023 16:42:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232836AbjAJVly (ORCPT ); Tue, 10 Jan 2023 16:41:54 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C48383E0F3 for ; Tue, 10 Jan 2023 13:41:49 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id d15so14628855pls.6 for ; Tue, 10 Jan 2023 13:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=D6WnFAop7d5E0yhy9sgHCW9UOo46MAfDHRFM7/8uo+E=; b=KJo+O1YHeWC2lzofGztS9Z6uTDMmVlWLB0oOwFB4cWH+JefTudLQrBvQ9KR/wES1DH s55YeZOuEP51yOAAqSkmWZNTq1yKCPsvdtJbtEoqrzV32YyGUkTOQfx8EHFErLRp0TIF dbA0iy0r1v6/0akvMtV1mZ9eZ1Xm+KDuKznSApxUXkTJepJ/gIxqYdmukpDLEO/yhv6O 4jSkBBYbPKepc1xYtHutIvS2acl7WeWD5vnG8IrzesVNneu25TSYWCJVCXpv/mTi1Kf5 5MejEMdYxX8VvvuKXVwll3PIyn7LXsrSSFRHPyho/vfnYzF+Vgscw9ESWteLVqat2eMM ZnGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D6WnFAop7d5E0yhy9sgHCW9UOo46MAfDHRFM7/8uo+E=; b=aFji+RhawzCpKvM1d4OLZHNxGlqsCkyed585PSCvpb0wmZG+69ecxzGcvAyOkois7J T1GSznqDih0cImlKtc4md9el+e67azY93gGaViQgLHqYq5E9pOoU45tmIALueQ+jVd2I OPU594bLFszb0DGW0fTO6hTDrxZOmxxUmC2wMUjel+7pRqaVW8lfeaXPp8SqMjTs4mWd f9kMCXP6ODuSblGpBXq0EkHsJ8sPsrZ/Rf4+moepQt4XKMwWn2CvfsNBh1ZVmSs1swdp H+s5EFeA88ibjkLk9VLCCrjoEk9O5AnHvj8kIOoXjUWLj5iNlyD+MJvhPseNgGAcEGc4 zmXA== X-Gm-Message-State: AFqh2krxAfgSDlDj6JE4s2xBAH1008Nqnugl6b0F+ewyrGx66bGSXmgM lpfxFWJrb/J1Dq6ez4VD61H0Ew== X-Received: by 2002:a05:6a20:54a1:b0:a5:170:9acf with SMTP id i33-20020a056a2054a100b000a501709acfmr25000775pzk.3.1673386908975; Tue, 10 Jan 2023 13:41:48 -0800 (PST) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id d16-20020a63ed10000000b00476799699e4sm7310757pgi.30.2023.01.10.13.41.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Jan 2023 13:41:48 -0800 (PST) Message-ID: <2c01e100-852d-d082-02b5-0b481fc72477@kernel.dk> Date: Tue, 10 Jan 2023 14:41:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v4 7/7] iov_iter, block: Make bio structs pin pages rather than ref'ing if appropriate Content-Language: en-US To: David Howells Cc: Jan Kara , Al Viro , Christoph Hellwig , Matthew Wilcox , Logan Gunthorpe , Christoph Hellwig , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230109173513.htfqbkrtqm52pnye@quack3> <167305160937.1521586.133299343565358971.stgit@warthog.procyon.org.uk> <167305166150.1521586.10220949115402059720.stgit@warthog.procyon.org.uk> <2008444.1673300255@warthog.procyon.org.uk> <2084839.1673303046@warthog.procyon.org.uk> <2155741.1673361430@warthog.procyon.org.uk> From: Jens Axboe In-Reply-To: <2155741.1673361430@warthog.procyon.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/10/23 7:37 AM, David Howells wrote: > Jens Axboe wrote: > >> I think it makes more sense to have NO_REF check, to be honest, as that >> means the general path doesn't have to set that flag. But I don't feel >> too strongly about that part. > > It's just that the logic seems weird with BIO_NO_PAGE_REF and BIO_PAGE_PINNED > being kind of opposite polarity. > > Anyway, see attached. Yeah, I guess I'll have to agree with you. So let's go with that approach instead, but then please: 1) Change that flag as a prep patch so you don't mix up the two 2) Incorporate the feedback from the previous patch Any chance we can get that cleanup_mode thing cleaned up as well? -- Jens Axboe