From patchwork Thu Apr 14 07:26:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12813035 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 319DDC433F5 for ; Thu, 14 Apr 2022 07:28:35 +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:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ESCTl8yB+2+6cnfzpq0g2KbgKq0llWDuYMPtAi3QArY=; b=w5K4FqskUPG20x clN3DryLNRuKKX0Xcot+rjKAUNvxa3S3KR3vIFjcRjsWTgx+gVTPONjHSwT/QG2/rVWlVG5WzEYAn peat0QLrnLhg9aEe9D7LUEY8B8PCk3zhhagVeU7+tFVu/QbQ0u9bkoLAQTbwjdcuTLrwlPx9ecBCh /t/dijPL9ldAUFZL4NY6AKOYuHgXb3pddJ3YDKNbQXw5OrTjLiDjY3xHzTDxor8Nq/pMHUxpP3BDt 2//wionpmNs6+fydNAIS9NutUbmkNPB6tUygQP9lX1iDYmnzWCO1BIzL0WA/YPKCR74GgTiuSh9sD VFa8WOn9E7CCpS1utKFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netsu-004Kto-Mu; Thu, 14 Apr 2022 07:27:20 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netsr-004KtM-0q for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2022 07:27:19 +0000 Received: by mail-pj1-x1033.google.com with SMTP id 2so4355813pjw.2 for ; Thu, 14 Apr 2022 00:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wvguC1MMEnFDh7Qcp5M1R+G1HkoQuUEH5rfx9xpUsnA=; b=jaLoiaYDZ4Z+d3A6bDm17qHMa77+2u7gO7myzhmWgH9KPUtRezWlSrTx3xSO75h6mp g522m5lYP+sbvbO/5i+pf39WI3w84AKwuZDDtWacAvYcjK1/t8405cGYHNkD93IyQ1sr xkqQCvBKxRzFduASufsfU0pf9ZE8Y7Kekwcnhpd4r2pecj9aaELXap50gwrZ/FIiBKTV axTGUy2UyJezhv1PvArIGA2cD/eXxTqSg0AYeVAoZrE+HiELtmfmoiyoLN/6P6V6eTTp flomRUq9GW/WQc66iEMzsRLyby3ySobEp4hJwLZMDnU9bneW7VTijI8kp4+R1EOKv8bH OgvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wvguC1MMEnFDh7Qcp5M1R+G1HkoQuUEH5rfx9xpUsnA=; b=SZm1u/cj0OwDrnO2vUlyJ76jse5Ykk4dXib0K5cOLTfFZQH4AmHHMNZr1Z7rmNDC6B SemSrSVVkbHNR/3fE1p0tZR0V2lhJTAvH9jpycBxRnW0ZF46T3Mue2kbPAL2NXAXnhFG ZP4hiOk6/sYekdXemJtxNNjL5uJOr18XWPmc3Oh2P2wlVySX0o2cdRTpEbHTUDB/jQQ6 Shl+Dt7IbZTaeyIJ5VVF0t2DKCi5Ui7NQBd8rJGSDjWjxqQRKkNfmvRwaVxD0UZ+r6N1 3XE9IyOyymgjdMF36unmUh8DZo545BeyvgckMIk2Ctw7QzgjthFjDvb1UCfL0Up4nC9j fQSA== X-Gm-Message-State: AOAM530PFmflDZSW7w8UGC1sC9cc+h/GOPFaEyhTVU8Uwg3b47MaCXQv 4b6w72FN6g9ComhwJfSeRuwbLg== X-Google-Smtp-Source: ABdhPJwb1EhQqtu5NSfeDtyR05g+YYJkKBUDHTScmG8s4MiDd912H4KhZb2gkcPWDOd1UjqETQrmLg== X-Received: by 2002:a17:90b:38d1:b0:1c9:ba10:353b with SMTP id nn17-20020a17090b38d100b001c9ba10353bmr2894180pjb.9.1649921234962; Thu, 14 Apr 2022 00:27:14 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.245]) by smtp.gmail.com with ESMTPSA id k25-20020aa790d9000000b00508232aecedsm1174002pfk.67.2022.04.14.00.27.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 00:27:14 -0700 (PDT) From: Muchun Song To: will@kernel.org, akpm@linux-foundation.org, david@redhat.com, osalvador@suse.de, mike.kravetz@oracle.com, rientjes@google.com, mark.rutland@arm.com, catalin.marinas@arm.com, james.morse@arm.com, 21cnbao@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, fam.zheng@bytedance.com, smuchun@gmail.com, Muchun Song , Anshuman Khandual Subject: [PATCH] arm64: mm: hugetlb: restructure the code comment inside flush_dcache_page() Date: Thu, 14 Apr 2022 15:26:46 +0800 Message-Id: <20220414072646.21910-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_002717_324830_42D23436 X-CRM114-Status: GOOD ( 12.44 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Restructure the code comment inside flush_dcache_page() to make it more clear. Reviewed-by: Anshuman Khandual Signed-off-by: Muchun Song --- This is based on next-20220407. Hi Andrew, Would you mind help me squash this patch into "arm64: mm: hugetlb: Enable HUGETLB_PAGE_FREE_VMEMMAP for arm64"? Because there is some conflicts with the patchset of hugetlb_vmemmap releated cleanup when you merge if I resend the original patch. arch/arm64/mm/flush.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c index 9e39598bbc21..fc4f710e9820 100644 --- a/arch/arm64/mm/flush.c +++ b/arch/arm64/mm/flush.c @@ -81,9 +81,10 @@ void flush_dcache_page(struct page *page) * read-only when CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP is enabled (more * details can refer to vmemmap_remap_pte()). Although * __sync_icache_dcache() only set PG_dcache_clean flag on the head - * page struct, some tail page structs still can be seen the flag is - * set since the head vmemmap page frame is reused (more details can - * refer to the comments above page_fixed_fake_head()). + * page struct, there is more than one page struct with PG_dcache_clean + * associated with the HugeTLB page since the head vmemmap page frame + * is reused (more details can refer to the comments above + * page_fixed_fake_head()). */ if (hugetlb_optimize_vmemmap_enabled() && PageHuge(page)) page = compound_head(page);