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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDB91C432BE for ; Fri, 27 Aug 2021 17:47:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A49E760FC4 for ; Fri, 27 Aug 2021 17:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238454AbhH0Rrs (ORCPT ); Fri, 27 Aug 2021 13:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbhH0Rrr (ORCPT ); Fri, 27 Aug 2021 13:47:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44CE2C061757; Fri, 27 Aug 2021 10:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=svL56QiGuEqf74xWCkOR06NnNiaAxd4UTs5cmuB+uic=; b=PT+RxIeEjsZlkUc1VjNjOaOMiF bZc/XQ7l9FKq6rVIFXSEbJGKnq/ZCw/6tcc7EpK+3fs6wfmcsx5+UVa/C7UK/Cg2imNvGtEFi956B glG5v0qAWJ2VOwyF7cwesHoezvHmUg7FOQqXiw/xoW76HlrRC1ypjm0V4+x+XhySc8AJdPv+SammD UxOsNMxA/aG3bjansIeQLlSizbEdDvl7IoRiZCv7Px29LgzgZw6ZFt/rL4Kr2A6wyCmQrXmkH1414 M+NFYJIjyzVOudLlpNWzTW9qaimcwDkjR0WQwCQ9WRW98S0ZbkST8FYBGVUXreaLz4+BSgTHpbo8d qPjOWg2A==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJfvD-00EozX-1t; Fri, 27 Aug 2021 17:45:54 +0000 Date: Fri, 27 Aug 2021 18:45:43 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Li Zhijian , linux-mm@kvack.org, linux-rdma@vger.kernel.org, akpm@linux-foundation.org, jglisse@redhat.com, yishaih@nvidia.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm/hmm: bypass devmap pte when all pfn requested flags are fulfilled Message-ID: References: <20210827144500.2148-1-lizhijian@cn.fujitsu.com> <20210827162852.GL1200268@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210827162852.GL1200268@ziepe.ca> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Fri, Aug 27, 2021 at 01:28:52PM -0300, Jason Gunthorpe wrote: > > + /* > > + * just bypass devmap pte such as DAX page when all pfn requested > > + * flags(pfn_req_flags) are fulfilled. > > + */ > > + if (pte_devmap(pte)) > > + goto out; > > I liked your ealier version better where this was added to the > pte_special test - logically this is about disambiguating the > pte_special and the devmap case as they are different things. Yes, I think that is much more logical. Also please capitalize the first word in multi-line comments.