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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91C15C77B7A for ; Thu, 25 May 2023 17:08:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239724AbjEYRIQ (ORCPT ); Thu, 25 May 2023 13:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjEYRIO (ORCPT ); Thu, 25 May 2023 13:08:14 -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 BBE96135 for ; Thu, 25 May 2023 10:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685034452; 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=YLlcUrQiEXzp0R9s84y2sre8aA1eRDuyfmIxS3WHh6vEUeaEHONssfNcCrZVIgFyOUHcIb oeaWlKLj6VyYDC2+se8367bM4QCPDggM7P4nAj/VJ1FLopw/hJz0aMJ9bEGFvaY8BJ8OJC 25wFSmlXwOrqQV/aAfp6kjKVtZiO9E8= 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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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