Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1286307rwd; Thu, 25 May 2023 10:21:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5IGMOVddu5LkMrUecnCpcsHoj5w/vW2yXdSzxO4VBSfmJWnM0/MASvP4nmh6fPjwQFTorJ X-Received: by 2002:a05:6a20:7287:b0:10e:e218:d3f0 with SMTP id o7-20020a056a20728700b0010ee218d3f0mr4641779pzk.54.1685035272532; Thu, 25 May 2023 10:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685035272; cv=none; d=google.com; s=arc-20160816; b=Inn2tRBpYn6nza9xfeiC4vIeWZ8+1aJllpbDkES95UuJ6Dh34AMDOPD21PY9o91sup kGAj04mJq8vgQ/fa7ebrYxjIwG1u2QzyNEROlQO4+Lu0qGF0JJFgYx/Zk+5U7orODWq0 XcCmz2VWm6olyKgSFGtVv5twfFBuqJAOJ0OFCdi/IhwCnQwli5wTh2JUmjuZRgR6MiX3 R6Ex7NLvRbsAt+09cth6gQ5ehzFEUkb8beETXEO1np1Q7ay7+rQiaiZtc6uHbOPOaW20 HbeC4rS6G0jMkyNZAyb5TVvJU9mu+PrMpO4fZJYrL7X++4qXb+6a3Yh2WH93zsO76WNO SeRg== 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-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=yDZd96TOpULddzcgHcmKbiy8NuWJmWBIeJnk+oDhHVQ=; b=ZYlmAWy4yFiAFEfCIMPlyPvhw2H9mhOhRESxHKmOFqA5Ca28B1kHZ+Ur6d04CQnwHJ f/L4IR1ngA0newJeLdGBTL6DdcmFj4mP6BDYI9UlrBN7QMy8LY0LTgK2KAUe8jipU7ZT R7P3I4P+DOMYDfHSXYMky5EvouVYyz4EuVmCyzLKCp3XRR1W2wmpMvV8bvmE6DMEt9Fw GHXHBgsLsrOnDewnX/5Byy4NPAAS98b/cFxj+9x+14wFiZqbdNgJPc97dZfb/IHhzTLl q5jT1JJxzUxlfFSyENpnHKC7f3750bKw4RqEahd0xZygtBI8SeM5i1bLe/f+4MY81CK8 gTfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jkw2l3T9; 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 h2-20020aa796c2000000b0063b7f1ed115si1880398pfq.167.2023.05.25.10.20.57; Thu, 25 May 2023 10:21:12 -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=Jkw2l3T9; 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 S240624AbjEYRIW (ORCPT + 99 others); Thu, 25 May 2023 13:08:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240513AbjEYRIS (ORCPT ); Thu, 25 May 2023 13:08:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A2D189 for ; Thu, 25 May 2023 10:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685034453; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yDZd96TOpULddzcgHcmKbiy8NuWJmWBIeJnk+oDhHVQ=; b=Jkw2l3T9TaRjdR5UYz8vL3f0R+GUx4AcaTyxZLbTHGSqjITsqyqCY9eLyun2m5XKGGBSvP hUORSq4yjxlfYarMB6UL5ygrPjR1wZc9e3k4XCqXcvkTWp5jh65ZFel47y2bwre/fbZ2iz FBePPR8McvFmvS5H7Q04NZAYhBZNlSk= 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-626-nWQ6QXH6MoOaA0gj3C8Gxg-1; Thu, 25 May 2023 13:07:27 -0400 X-MC-Unique: nWQ6QXH6MoOaA0gj3C8Gxg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 023411C05133; Thu, 25 May 2023 17:07:26 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3032492B0A; Thu, 25 May 2023 17:07:23 +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: <20230522205744.2825689-1-dhowells@redhat.com> <3068545.1684872971@warthog.procyon.org.uk> <3215177.1684918030@warthog.procyon.org.uk> To: David Hildenbrand Cc: dhowells@redhat.com, Linus Torvalds , Christoph Hellwig , Jens Axboe , Al Viro , Matthew Wilcox , Jan Kara , Jeff Layton , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: Extending page pinning into fs/direct-io.c MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <98509.1685034442.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Thu, 25 May 2023 18:07:23 +0100 Message-ID: <98511.1685034443@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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 David Hildenbrand wrote: > I think the correct way to test for a zero page is > is_zero_pfn(page_to_pfn(page). > = > Using my_zero_pfn(vmf->address) in do_anonymous_page() these can easily = end up > in any process. Should everywhere that is using ZERO_PAGE(0) actually be using my_zero_pfn= ()? ZERO_PAGE() could do with a kdoc comment saying how to use it. David