Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp872796rwn; Thu, 15 Sep 2022 07:35:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5eIzhtYyTCxYpmn+5LkbSPp8Cke+n2lO6iM92H6653hW+rd0FivT9mW209FGD3ErzlUrQ6 X-Received: by 2002:a17:906:8a45:b0:770:26a9:a99 with SMTP id gx5-20020a1709068a4500b0077026a90a99mr204131ejc.47.1663252546126; Thu, 15 Sep 2022 07:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663252546; cv=none; d=google.com; s=arc-20160816; b=cF/GADkej+zy7BOLyvAqE5HsxbuKi7b100lSr8ZEUmSp9YJrcIOpscVisfqqgnlv2V TjWm4hCD8x+d9+4dCkyU0Pglk/7Yogpa3UuPbNto8GoClzkaoVA1hvC13Q5iNYAqI6Zv i60Em/sQs6TF06aD7KUcrtbwqVbLnm4AhFiW6xSKQuSvhPvKtTQHgvxnGS6bAvDLsPtI 4jRhI8QawgNi5hzjW59NOOIBUu6E8tNz8WBqPH3s03dfZOEgdWqlhA8sFKOevT+qAkcl H2l6E1wZdgwRe+H3aNnjBxBT/IjzkDHEjCvvZCvGmcwaLwYAfEBneutya+Zonuj2Asvf G9IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DbCpd0oRSZq3hOZrgbrh0K5Ecbd41nlcDZ2Us9cP08g=; b=p4dg7oULDohPjarA7XmZ/LceSNdVGlOMj855wAFE8drYDPbhOLrxmeOz5AoZ05LLbz s6KwHefv6ZUcbZJ7JUfb8n1xKgpYPaFtqqF9nOcTpn3KzTLN6WGNtJZnsGo/EFBIeApI mNOgPLN6XV3jPGYPENzKEDLBABxK/ntYwS3qh965sfmRrfD0RHqj3SuhSI8PnKTgnIpt WGmW/9O75A8lfBp/71wMO/lNMkBlqmhbQ4CoPIs+Ai1S0E4wcIMT8AVoWuSKUZFNFzwz DH/UazXQVqGMr58EY219M16yzqqsniiHRLaDP1FaYelEi/qFq+5Ob0sue2wg+aYgPxpL UvEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be1-20020a1709070a4100b0077c51b05b23si12138296ejc.290.2022.09.15.07.35.06; Thu, 15 Sep 2022 07:35:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbiIOOWx (ORCPT + 99 others); Thu, 15 Sep 2022 10:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiIOOWr (ORCPT ); Thu, 15 Sep 2022 10:22:47 -0400 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 102514361E for ; Thu, 15 Sep 2022 07:22:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R441e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VPtLfkE_1663251760; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VPtLfkE_1663251760) by smtp.aliyun-inc.com; Thu, 15 Sep 2022 22:22:41 +0800 From: Xin Hao To: sj@kernel.org Cc: akpm@linux-foundation.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xhao@linux.alibaba.com Subject: [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP Date: Thu, 15 Sep 2022 22:22:37 +0800 Message-Id: <20220915142237.92529-2-xhao@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20220915142237.92529-1-xhao@linux.alibaba.com> References: <20220915142237.92529-1-xhao@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In damon_young_pmd_entry(), it calls pmd_trans_huge() to check whether the OS supports THP, if CONFIG_TRANSPARENT_HUGEPAGE is not included, the pmd_trans_huge() will return 0. Signed-off-by: Xin Hao --- mm/damon/vaddr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index 58bf1bbad530..21daaa5503fb 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -434,7 +434,6 @@ static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr, struct page *page; struct damon_young_walk_private *priv = walk->private; -#ifdef CONFIG_TRANSPARENT_HUGEPAGE if (pmd_trans_huge(*pmd)) { ptl = pmd_lock(walk->mm, pmd); if (!pmd_present(*pmd)) { @@ -462,7 +461,6 @@ static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr, } regular_page: -#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) return -EINVAL; -- 2.31.0