Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1683762rbb; Mon, 26 Feb 2024 19:14:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUVyxuYhIq1O3Pmm4y3s5zQSD9c4rIxte8SHFCcJgtCFTbq0Wqch6ZtTkXRe3tL7f1ZT9IMR6rgt+Bnf2ehl2X8uXXRt58unG1Qlu2Bpg== X-Google-Smtp-Source: AGHT+IF1rM4NHUOY1z0wn7/i0H+qSAfU3TpyIzUaKsXtWwUrb9mV4Om+zGxbAy1kg4rtH3WPx+UF X-Received: by 2002:a9d:7846:0:b0:6e4:72e3:eb63 with SMTP id c6-20020a9d7846000000b006e472e3eb63mr8827393otm.9.1709003697196; Mon, 26 Feb 2024 19:14:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709003697; cv=pass; d=google.com; s=arc-20160816; b=buO/ZB+f2Vs+4B6ic1DDdNoEzkTKUol0oKj0cowviVg3mqmwnEiHErB00fFmEvBhaI /XvHwa2mU5UVQzu6NHr99EulKt4EdDMGdggWhTlRYyAGpUZts13lZqsNaqQ7ItKtbeX9 1EDG40BiSJPTOvFBi3+2IDa/f7BwivpJI4Vr2/8JMo0kX8/Qa01vaN1ZY52vvzn4lGFe T/Vsa2dZQUop2FdfaBd4zVZaB4KHa/F2YysUWjs5cWtOhOT/ln2Hgfr7n+slj0MWfC7c HjqYreW5+eDqCwKT/6dFIAKJp/nBhz3mk3OZRT4BUNXpMAeUm4RXd41fxVdwixn6E5oa 2XXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=e8J4Iq0ebSOaKQyECIJg/FsMMitHH+FXvg2jZ0zt/7U=; fh=sR0/iprZH0qKY693kPKNjVpS1qOLXSxneTmIu7O/lrM=; b=LjC1TbEkorgzDm16KP+SuGy6mp8irBBLGgn4iJTj+PDXzNDEHhKZXMRpyaeRbRPz/2 2jK8euuHDbytp6vcUOWONClPTis63zj/sEvlVzuIBfiXU3ysfWK98+km1n9Tw5hfrSne G7Pbluc6QxlPiumS8YViQBMP3VHQ1xlR/kCUKGmfO3Sxy08ngagJaZvrWwlSPV9DdO9p yk5YTk6gvH5tDpfyKj4/w49c6FW/f3sxKhOFj1ynxj/uQp/m/GM5CnNnyMjeA4aBYtEU B9+UpR/B8G8Mjtp90P5eZ9BM1CzsAdErIozavJX/7FY83HVRAkrZTrFVDF4BA8dvMTFN 0IHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-82645-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82645-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s5-20020a63e805000000b005cdd9963f49si4831176pgh.863.2024.02.26.19.14.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 19:14:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82645-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-82645-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82645-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D9F7F285336 for ; Tue, 27 Feb 2024 03:14:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4A821D54A; Tue, 27 Feb 2024 03:14:50 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B14491B949 for ; Tue, 27 Feb 2024 03:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709003690; cv=none; b=ZS6MsQXrUAlfq576RS7wD889XIxhWpE87E21FG2Ds4lVkfoED977LYsD9DlTJK0pOzhvipsJzH2H7hcHdyVMRpoVf/50LgJCCMkp594mqNFIQNLOdydhSZe+j4kgswCeagNZ6mf9wpX76OHZBvNRry1zTGxNYsInhw1ouoRRLdI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709003690; c=relaxed/simple; bh=ah7zT0BOsyf1Fi3ykpA0V0G/4GdGmpeo3mumkB+XpYc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=o1EIaYStRbdS48wp+1ot5cqv/MOlNEdywLxJezrRhHgGY5FzXNxRDazEIKFa3MAiCFShAi8MVzg4+fRfl5KnYBh+CvrKM27htixtO7xvnaX1weaHA4g3ElhI8Ns+50vkwVxdQYS4DsAJYKi8mWqBGIInik+94eaSAi3vEuKh5E8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: c8ede15c63dc4319b205f5b6728f9dcf-20240227 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:c3c17bce-c308-4406-879d-1df336acef54,IP:10, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-5 X-CID-INFO: VERSION:1.1.37,REQID:c3c17bce-c308-4406-879d-1df336acef54,IP:10,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:6f543d0,CLOUDID:8a4cda80-4f93-4875-95e7-8c66ea833d57,B ulkID:240227111434QEHVDYUI,BulkQuantity:0,Recheck:0,SF:24|17|19|44|64|66|3 8|102,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil, BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR X-UUID: c8ede15c63dc4319b205f5b6728f9dcf-20240227 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1125639519; Tue, 27 Feb 2024 11:14:32 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 4A023E000EBC; Tue, 27 Feb 2024 11:14:32 +0800 (CST) X-ns-mid: postfix-65DD5398-216374431 Received: from [172.20.15.254] (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id E330FE000EBC; Tue, 27 Feb 2024 11:14:28 +0800 (CST) Message-ID: Date: Tue, 27 Feb 2024 11:14:27 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp Content-Language: en-US To: Michael Ellerman , npiggin@gmail.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20240125092624.537564-1-chentao@kylinos.cn> <87h6hva4b0.fsf@mail.lhotse> From: Kunwu Chan In-Reply-To: <87h6hva4b0.fsf@mail.lhotse> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for the reply. On 2024/2/26 18:49, Michael Ellerman wrote: > Kunwu Chan writes: >> This part was commented from commit 6d492ecc6489 >> ("powerpc/THP: Add code to handle HPTE faults for hugepages") >> in about 11 years before. >> >> If there are no plans to enable this part code in the future, >> we can remove this dead code. > > I agree the code can go. But I'd like it to be replaced with a comment > explaining what the dead code was trying to say. Thanks, i'll update a new patch with the following comment: /* * No CPU has hugepages but lacks no execute, so we * don't need to worry about cpu no CPU_FTR_COHERENT_ICACHE feature case */ > > cheers > >> diff --git a/arch/powerpc/mm/book3s64/hash_hugepage.c b/arch/powerpc/mm/book3s64/hash_hugepage.c >> index c0fabe6c5a12..127a3a2c174b 100644 >> --- a/arch/powerpc/mm/book3s64/hash_hugepage.c >> +++ b/arch/powerpc/mm/book3s64/hash_hugepage.c >> @@ -59,16 +59,6 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid, >> >> rflags = htab_convert_pte_flags(new_pmd, flags); >> >> -#if 0 >> - if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) { >> - >> - /* >> - * No CPU has hugepages but lacks no execute, so we >> - * don't need to worry about that case >> - */ >> - rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap); >> - } >> -#endif >> /* >> * Find the slot index details for this ea, using base page size. >> */ >> -- >> 2.39.2 -- Thanks, Kunwu