Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1526390pxb; Fri, 27 Aug 2021 10:48:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiSleWueheQZc2AG4cCW10CDzRax0nstM0xsOFyqcCas2IXhTHZzB80SIbRj+scEjX78iQ X-Received: by 2002:aa7:d508:: with SMTP id y8mr11021648edq.333.1630086525643; Fri, 27 Aug 2021 10:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630086525; cv=none; d=google.com; s=arc-20160816; b=o81nA42mgFguYSl2OYv5SMPdoqKT3AhRdZioQj8WV7Jve/l63+m4EJaht2JScfGZKX sFihg3V1nfhhAHdDMlUVt/os9yNfGhM+QRkCMYBgtFc3Mq/sWeZ6t2b+p5Jda3jNiyUE d8brSivDscOeiJbROEeq9E9p49eXZ3Pku0iZtGuTp1Fnz/R+yiPdR8gAOHnbu8QhRt/s IqaYugcCqLbC+Y5i/huhqjKDurRTn4XkM89Il4cVC/vQp0sibuS3j5XZncdJsduWrMOI pD2vh/+Y/qp59YqT//g5zHlyS2POjFxjyj/cekfujKpX6zRRPHgkiEqOu/hVs+oz+1+v P1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=svL56QiGuEqf74xWCkOR06NnNiaAxd4UTs5cmuB+uic=; b=mDYKPPsVUx9KpbidWflnsIcM6d/4zpyba3z2NMjDgu3DguRgjw3WfAWe3eA6aLvnlH m1jXCYvTDk/q8v2/pgQqM3abNa/K1PfNj8Eg1LnrtUMET4fdxmNYqTCxKJLRXBsyee0P ZYnj1oA1RJL/hvyy9tSgUf1xKJvcizCNgXbKI6hyitp79Oyecf11vpVg6OtQSCYzI98X KFIiwGRsVgUAKidSSobk9XgRp9YubFYDPT+PzZsXOwoRzegMS4f5+bLefg6tGiX/BhaT Pu2xtNYhnalEP6wVujeGP1pF5klAd7lFg02ymxvTIt/ACsbz7D2r3W1nosxjSZhYu4OZ Gd1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PT+RxIeE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si4271986ejy.319.2021.08.27.10.48.23; Fri, 27 Aug 2021 10:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PT+RxIeE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238836AbhH0Rrt (ORCPT + 99 others); Fri, 27 Aug 2021 13:47:49 -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-kernel@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.