Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2108595rwd; Fri, 26 May 2023 01:39:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lGclttX4bvS7jg2x2b0UN0X+d/tXqibqHtO6Zz40QaZClsrFU9wLqukOP45GdFSX9iLvP X-Received: by 2002:a05:6a20:9194:b0:10d:3ff2:4531 with SMTP id v20-20020a056a20919400b0010d3ff24531mr1281391pzd.29.1685090398792; Fri, 26 May 2023 01:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685090398; cv=none; d=google.com; s=arc-20160816; b=yh70p9A0KHbbj5Ep7yffPXWjEtVEkb/K9Xf/4FrrBVsfOE/J80i380rBEWL4ihuRmx xadenIgn9Kd4oKGOK7KxpgSgBzto0B+35trZxvTKZbyVi9EqZsa1vTyRvo7dUp8olyRe hHT8CogDd++ioyVc0OMMD4kqzMXhAv9ukBbDJc4K0wK1nLIKtcSU8qN0qhuCLAfHNv+6 kQQgbiTRbBFbg8prRgJqPX5ww3ztWlWuaxRwWfSj/YnjPIpIrNKbOb07m3edDfeeBnEC 5oZKZBtrDAG4Kanfaioq7GWIOHSMWIJvt9LX0Fnl0PPpZayh5QvT5arTUatsUgwO436X 30Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=HZdbB846VP2Mif8vkzLshswwvIDgJcVcn/Vxjtn6SVU=; b=eYNL7WFkOdnLLdql5ObnlfuUffxgkkQMHeOpiIykianGFJ/6ueySRbiJRRZAmwUzdX jq3opz5Liu01kkh8waGfbCq6+sDnRM8qCT6lQzUQxAQfefbKAPcNZOxd/cwpNR3cTQsg w3q9sBkMw8Z0NK+HUi8wBD5sA0qnv8G2jRUlyDQPy0Ay6NAHeTci0CpfgNSbTUrVFC4H 18J63FOYFTHQfl0cBoeEAY0kyRzAGqE6AMXt9/gdUVk2lMvBEn76k2lqRv3A9U+0l8B/ uteMcce9jdf8GigPglDOTtQenY5lQIl+K/7va5gJZ2Y3UdGt1Q6n5FjYI+y1WLWa3md8 Beng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xw6FrAwe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020aa78e83000000b0063b88c406c4si2408980pfr.171.2023.05.26.01.39.46; Fri, 26 May 2023 01:39:58 -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=@redhat.com header.s=mimecast20190719 header.b=Xw6FrAwe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242739AbjEZIe5 (ORCPT + 99 others); Fri, 26 May 2023 04:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242729AbjEZIep (ORCPT ); Fri, 26 May 2023 04:34:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05F31D8 for ; Fri, 26 May 2023 01:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685090038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HZdbB846VP2Mif8vkzLshswwvIDgJcVcn/Vxjtn6SVU=; b=Xw6FrAweQiQZWgGCdrygbEAM46534Rd69zWxuN9WKBqID6WeRW/JSkdfWBHDhwgjKR5yda diXH/8H7lA9IA/BwqL/tRdsjLQtvC5UF5MAwuuLaim/pLLl4ccKSekNXsckgoTtM9GcQIW 88wQvEozYo1qofynra7S+pGH42JgQxw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-31-7sMtwyH8MCSL5zzDtp_gYw-1; Fri, 26 May 2023 04:33:51 -0400 X-MC-Unique: 7sMtwyH8MCSL5zzDtp_gYw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 626FE1C04180; Fri, 26 May 2023 08:33:50 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3E5C200AD47; Fri, 26 May 2023 08:33:47 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20230525223953.225496-1-dhowells@redhat.com> <20230525223953.225496-4-dhowells@redhat.com> To: Christoph Hellwig Cc: dhowells@redhat.com, David Hildenbrand , Jens Axboe , Al Viro , Matthew Wilcox , Jan Kara , Jeff Layton , Jason Gunthorpe , 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, Andrew Morton Subject: Re: [RFC PATCH v2 3/3] block: Use iov_iter_extract_pages() and page pinning in direct-io.c MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <520476.1685090027.1@warthog.procyon.org.uk> Date: Fri, 26 May 2023 09:33:47 +0100 Message-ID: <520477.1685090027@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,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 Christoph Hellwig wrote: > I'm not seeing where we skip the unpin of the zero page, as commented > in patch 1 (but maybe I'm not reviewing carefully enough as I'm at a > conference right now). It's done by unpin_user_page{,s}(), hidden away in gup.c. See the commit message for patch 1: Make pin_user_pages*() leave a ZERO_PAGE unpinned if it extracts a pointer to it from the page tables and make unpin_user_page*() correspondingly ignore a ZERO_PAGE when unpinning. David