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: 12813034 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B637CC433EF for ; Thu, 14 Apr 2022 07:27:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 186C36B0071; Thu, 14 Apr 2022 03:27:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 136E26B0073; Thu, 14 Apr 2022 03:27:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F40116B0074; Thu, 14 Apr 2022 03:27:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id E16F86B0071 for ; Thu, 14 Apr 2022 03:27:18 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 9F4458277C for ; Thu, 14 Apr 2022 07:27:18 +0000 (UTC) X-FDA: 79354653756.02.7B7BB0B Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf28.hostedemail.com (Postfix) with ESMTP id 54FF3C0005 for ; Thu, 14 Apr 2022 07:27:16 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id bx5so4347846pjb.3 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=2xleFmHdEQ/EYQaKFYKPPdHMwCwIoswfh2NdWE7S4RBgGfSZVSvRMxy62mEP+9lzAj NN4X8/qF2tCZe4BuIDxsC2BYQLP1TTwQpK0yhCeHVAxrx96TFW7dhFXaqBSBZv1WVbUJ 5BvoHHz7pDL+nls1P6GTvqzysyQjxMDZw2uNOEKBTVrMg+hInqc9HYkgHrMLh4aEvO8P OAOWl7ovO11jisROPfRhrL+tVZ4RbWNgPeG9p8gIcQu35fNHeuTtGBF5NMeRSCYNDNyW YIniNnmoj6pCNjchECqpbJuXiQxsrlXl5ImsptCV/R60fEQfUjPMWOrWue2XedWrBSPp NZKQ== X-Gm-Message-State: AOAM532IhxM6xI4ONiHyoUzVMYvLD9Znj3Ioq5yXApTwK5HuxJikKcu+ 1uWgq+SD8+trplFpC4Mnk0i5Yg== 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-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 54FF3C0005 X-Stat-Signature: hmxz97p8ew1fk3xngwho3nsou9ewfyir Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=jaLoiaYD; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf28.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.216.52 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-Rspam-User: X-HE-Tag: 1649921236-937335 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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);