Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4910048rwd; Tue, 23 May 2023 14:44:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SpSb2s2hlNv13YW5kvwqRENtL/UK2HE+ITtyhs3hYFZGKDgCcWEx8anynKCyMkwuD12gD X-Received: by 2002:a17:903:22c2:b0:1ae:1237:874d with SMTP id y2-20020a17090322c200b001ae1237874dmr17473171plg.69.1684878279100; Tue, 23 May 2023 14:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684878279; cv=none; d=google.com; s=arc-20160816; b=H1o1UwawmBSe/9d5d2eeMPpXb/jlAsoNXbHNIHHD4fRc2bdqo9ymjW7loQTuCQEGEg rpsaWWw0B3OXm/+TU7ma5E+BVWB+0fqbexb1tz10zGBeBiSH7XVmFMytXnfrtY54Yt9+ jSlRz/pMxFOYchAdj5Rm60kfTABVuvCjXuGiYvg47jsIkkNSEBLFQst/2gWlpzr4uR1Z qboTnCsOb+L7TZfPg3pyW/rWF2oQsoPF+pVxVoHBjZ/JzOKg1+l/RDMCzP9YExpl/ikY b1cdKeBnUwU3Mvr6dnP0ejc118RmMXzWJ8NJuIlbmUlr+LCVkx34Krq5HgP8YR1ZoGKH oNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=Y3hgiqpB5zVKDFFdyJMjJwHka3pMf+c6meTRxKFE5Y8=; b=EEv4RU3l/NPmSueyo6IcUlj9Yg+MoBymJGJLEH3wplY+usUWL6xee2jQ8P2jg9v5Wq SG10gUqPA/Adxr3wyq8WpdcqUXfftnbeCwN1Ai+zsQYiKEfGINVDDedXdN5m83AJq1KB T7wqkiNWi+ZE4hCBz9jap8upYdlbejJwjdv+HJYYtTAJ6egeOJzQf+swWWz2SpXENyix igSgZq0quXz51rp++oVA0is1nCkGmgPCvkPG80X9o97Aq0+JYd1tk/USsOK7P4b6xyFk U2lMey5GSBcmwz1DhIA/3O0d6Ghgl2ep5U3akD42jTXtrIbiPcx6yY439pfYy2X4Fr51 ZqPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=HV0x7zMa; 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 jc20-20020a17090325d400b001a69f1cea63si6831205plb.223.2023.05.23.14.44.26; Tue, 23 May 2023 14:44:39 -0700 (PDT) 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.20221208.gappssmtp.com header.s=20221208 header.b=HV0x7zMa; 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 S238632AbjEWVih (ORCPT + 99 others); Tue, 23 May 2023 17:38:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238615AbjEWVie (ORCPT ); Tue, 23 May 2023 17:38:34 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8682B13E for ; Tue, 23 May 2023 14:38:33 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64d722dac08so55116b3a.1 for ; Tue, 23 May 2023 14:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1684877913; x=1687469913; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y3hgiqpB5zVKDFFdyJMjJwHka3pMf+c6meTRxKFE5Y8=; b=HV0x7zMa3YUbocqLk9aQXetrr9ryZrB2RfV/YHAmZdFJpj+J580kbNoVs4yJlfTFah ckNKve4m5JHJM0d8z9nn7Yqv7jv5UBLUa+T+a8+ebv1Wsbais4D+qvWMEy2jRH4dil9G tJ7wy8o9Lz273r80L/Z1B57YiCRZwsGm+tYwKZyFWJwnBZuZthVeTePg7VZl6oiN2XJ2 9GRQt0ScSnlnvSHgMNgKlnibVxl1CRc+bBWnxfS2cgidXqKhWTDIngNLnXI9LrKYMY1f 4TvQMgtsNSNAKpHzNi22AtmTavnbUWPICiuWaY95rxXfeRRuU53lRjLfUDp61LpRkgnr H+Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684877913; x=1687469913; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y3hgiqpB5zVKDFFdyJMjJwHka3pMf+c6meTRxKFE5Y8=; b=G9fio94B1EKCqA+cpKZ+6tmaKgWHe3DZpHFpZn/+V0s7AsXVx5C/VUhzc+lX3TfqKE uq+5nkqjY1i0ewJicqJI+Ao7j8pJFHLMwXV7KICKMrH/2gLwjCHddNlDE3g2KIcOfsks uAG0ap6GVzaUiSssGr084dgmegmvHnTUF+fd2scswpr2IpZM3Y0iCq0VSoq67lcT4e8B hg0+XHZ9Xm47VhmYlQv76oJgwelqdEwonnSTxJSRUcsUkkc4sjW+NsOQiVxBziajyJwW WcSE/Ot4Ya+8Ik5+bZQGZiMgqgP2OhYCYpA5YmVXkkbFP7ljyONg+AggDb4RkwvCHUpk aQmw== X-Gm-Message-State: AC+VfDw0IG+TCmhIfJ6pJUmpB1lyudFhqtx1/bY4qgW6t8FCg6ahSu9e CrsU9nHQ+28B3U067tV4ZmJahw== X-Received: by 2002:a05:6a20:7da6:b0:100:eb1e:3939 with SMTP id v38-20020a056a207da600b00100eb1e3939mr15611360pzj.1.1684877912960; Tue, 23 May 2023 14:38:32 -0700 (PDT) Received: from [127.0.0.1] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id j12-20020aa78dcc000000b0062de9ef6915sm6168473pfr.216.2023.05.23.14.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 14:38:32 -0700 (PDT) From: Jens Axboe To: Al Viro , Christoph Hellwig , David Howells Cc: Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe In-Reply-To: <20230522205744.2825689-1-dhowells@redhat.com> References: <20230522205744.2825689-1-dhowells@redhat.com> Subject: Re: [PATCH v21 0/6] block: Use page pinning Message-Id: <168487791137.449781.3170440352656135902.b4-ty@kernel.dk> Date: Tue, 23 May 2023 15:38:31 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13-dev-00303 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 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 Mon, 22 May 2023 21:57:38 +0100, David Howells wrote: > This patchset rolls page-pinning out to the bio struct and the block layer, > using iov_iter_extract_pages() to get pages and noting with BIO_PAGE_PINNED > if the data pages attached to a bio are pinned. If the data pages come > from a non-user-backed iterator, then the pages are left unpinned and > unref'd, relying on whoever set up the I/O to do the retaining. > > This requires the splice-read patchset to have been applied first, > otherwise reversion of the ITER_PAGE iterator can race with truncate and > return pages to the allocator whilst they're still undergoing DMA[2]. > > [...] Applied, thanks! [1/6] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing commit: 9e73bb36b189ec73c7062ec974e0ff287c1aa152 [2/6] block: Fix bio_flagged() so that gcc can better optimise it commit: b9cc607a7f722c374540b2a7c973382592196549 [3/6] block: Replace BIO_NO_PAGE_REF with BIO_PAGE_REFFED with inverted logic commit: 100ae68dac60a0688082dcaf3e436606ec0fd51f [4/6] block: Add BIO_PAGE_PINNED and associated infrastructure commit: 84d9fe8b7ea6a53fd93506583ff33a408f95ac60 [5/6] block: Convert bio_iov_iter_get_pages to use iov_iter_extract_pages commit: b7c96963925fe08d4ef175b7d438c0017155807c [6/6] block: convert bio_map_user_iov to use iov_iter_extract_pages commit: 36b61bb07963b13de4cc03a945aa25b9ffc7d003 Best regards, -- Jens Axboe