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 6D2AAC433F5 for ; Fri, 6 May 2022 03:02:52 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=waZGGJV8ZjAPUf1VOa6D2KwXoZafr3UxnllJpdrIUsY=; b=wW9oqt/+OIbFxd tZ5S0+WgRozSOYcniUpU56ljmGM3Pw614tiTMbbwFdswcNZhPh+GWKgDbcQ+b1n7qlRPIbiitv8/5 pn/G3Xjxo6MLJ3/HRwpRVphvb1xUtYSMw4NxLx126+6fkVIFvv0d3lXu43pm1VJwilaUnfgn4vf4a u+Cpgn0IykiuJK3FQ47H7j/rXiPWAyafId0yeENO+XEOga41tn+g6OAHJ55hOgQSvkTg7vNDkG/zw roXTA77V5aU9+/ID6aQuT49n2tyjixEETvre6JYX+bwUnzKQwEdfQnXuZiZxFRJG1mmgyzHhyXo4K wBMN64WCpOsZ7axRXqyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmoDy-0013Ku-MZ; Fri, 06 May 2022 03:01:46 +0000 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmoDu-0013J1-SK for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 03:01:45 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R161e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04400; MF=baolin.wang@linux.alibaba.com; NM=1; PH=DS; RN=30; SR=0; TI=SMTPD_---0VCQ-60L_1651806089; Received: from 30.32.96.193(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VCQ-60L_1651806089) by smtp.aliyun-inc.com(127.0.0.1); Fri, 06 May 2022 11:01:31 +0800 Message-ID: <6c8a5b23-e470-63ca-cc82-f8b5ff1bafaf@linux.alibaba.com> Date: Fri, 6 May 2022 11:02:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte To: Mike Kravetz , akpm@linux-foundation.org, catalin.marinas@arm.com, will@kernel.org Cc: tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org References: <495c4ebe-a5b4-afb6-4cb0-956c1b18d0cc@oracle.com> From: Baolin Wang In-Reply-To: <495c4ebe-a5b4-afb6-4cb0-956c1b18d0cc@oracle.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_200143_129580_91DDCB94 X-CRM114-Status: GOOD ( 12.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/6/2022 7:15 AM, Mike Kravetz wrote: > On 4/29/22 01:14, Baolin Wang wrote: >> It is incorrect to use ptep_clear_flush() to nuke a hugetlb page >> table when unmapping or migrating a hugetlb page, and will change >> to use huge_ptep_clear_flush() instead in the following patches. >> >> So this is a preparation patch, which changes the huge_ptep_clear_flush() >> to return the original pte to help to nuke a hugetlb page table. >> >> Signed-off-by: Baolin Wang >> --- >> arch/arm64/include/asm/hugetlb.h | 4 ++-- >> arch/arm64/mm/hugetlbpage.c | 12 +++++------- >> arch/ia64/include/asm/hugetlb.h | 4 ++-- >> arch/mips/include/asm/hugetlb.h | 9 ++++++--- >> arch/parisc/include/asm/hugetlb.h | 4 ++-- >> arch/powerpc/include/asm/hugetlb.h | 9 ++++++--- >> arch/s390/include/asm/hugetlb.h | 6 +++--- >> arch/sh/include/asm/hugetlb.h | 4 ++-- >> arch/sparc/include/asm/hugetlb.h | 4 ++-- >> include/asm-generic/hugetlb.h | 4 ++-- >> 10 files changed, 32 insertions(+), 28 deletions(-) > > The above changes look straight forward. > Happy that you Cc'ed impacted arch maintainers so they can at least > have a look. > > The only user of huge_ptep_clear_flush() today is hugetlb_cow/wp() in > mm/hugetlb.c. Any reason why you did not change that code? At least Cause we did not use the return value of huge_ptep_clear_flush() in mm/hugetlb.c. > cast the return of huge_ptep_clear_flush() to void with a comment? Sure. Will add an explicit casting in next version. > Not absolutely necessary. > > Acked-by: Mike Kravetz Thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel