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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D017DC54FB3 for ; Thu, 29 May 2025 12:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Tp+rSCQA17kN2hU7COTnvvb9HqtAQXa7ok2ovKmFvz0=; b=qX4cH1QkAxcvw+ IU38BvxeKLJY762fTRngpa79rcn3jwTWq71oE1MeHs7Q5faKJxd35EehWEYdL4Vykz6YLpkWfyAwT WuFml6cQHLz4KARKZl8oiWgk+ddsd4BrjSM9Rv6sH5xymdNA6QyuPHF/hMQXtHa7mEEn+pwcc/M8Y ihkfUnMzxv8K5KSfFq6NhTKIXgUAw20iUzkYgcsGJQdis4GqXMOyiOGugalBiFf05zjvyixnSXJue qbRXNkUw5NTkB+tG3brJLHHY6TJf78f3+CALY62+9G6DiBa/Zvlxe/jcuomCI45lzZMxvmTtP0+V5 eAScV0Mex77khlynK71g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uKchL-0000000FmTh-0lxQ; Thu, 29 May 2025 12:49:27 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uKbqP-0000000FgSL-3YHj; Thu, 29 May 2025 11:54:47 +0000 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4b7PpG0pPHz6L5j3; Thu, 29 May 2025 19:51:02 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id A1AA5140519; Thu, 29 May 2025 19:54:38 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 29 May 2025 13:54:37 +0200 Date: Thu, 29 May 2025 12:54:35 +0100 From: Jonathan Cameron To: Alistair Popple CC: , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 07/12] mm: Remove redundant pXd_devmap calls Message-ID: <20250529125435.00001378@huawei.com> In-Reply-To: <2ee5a64581d2c78445e5c4180d7eceed085825ca.1748500293.git-series.apopple@nvidia.com> References: <2ee5a64581d2c78445e5c4180d7eceed085825ca.1748500293.git-series.apopple@nvidia.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To frapeml500008.china.huawei.com (7.182.85.71) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250529_045446_025577_830B4170 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, 29 May 2025 16:32:08 +1000 Alistair Popple wrote: > DAX was the only thing that created pmd_devmap and pud_devmap entries > however it no longer does as DAX pages are now refcounted normally and > pXd_trans_huge() returns true for those. Therefore checking both pXd_devmap > and pXd_trans_huge() is redundant and the former can be removed without > changing behaviour as it will always be false. > > Signed-off-by: Alistair Popple > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 8d9d706..31b4110 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -1398,10 +1398,7 @@ static int insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, > } > > entry = pmd_mkhuge(pfn_t_pmd(pfn, prot)); > - if (pfn_t_devmap(pfn)) Didn't this go away in patch 5? I didn't check but this looks like a bisectability issue. > - entry = pmd_mkdevmap(entry); > - else > - entry = pmd_mkspecial(entry); > + entry = pmd_mkspecial(entry); > if (write) { > entry = pmd_mkyoung(pmd_mkdirty(entry)); > entry = maybe_pmd_mkwrite(entry, vma); _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv