Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp685412rwb; Thu, 18 Aug 2022 10:18:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR6fVxOUXI7h2rz3T0Ce5Oe5zNz9gTuypAOBUKdIMXr6lX4JDCxzF4AVY0idRlEz6CTZWJpj X-Received: by 2002:a17:902:710e:b0:172:7ad4:39b3 with SMTP id a14-20020a170902710e00b001727ad439b3mr3526039pll.78.1660843138749; Thu, 18 Aug 2022 10:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660843138; cv=none; d=google.com; s=arc-20160816; b=N42XQHx64fWMaVulp5+FvDKgXILFRAxX0MWPUdjN24cgt6l3y9IH0EIDMODW5WwcYs Gc/fM3eXb/VXEkD4BOIuK3JmuOzEMkrTSiXdXcwIhuBkAWfJpwLSiq6N+5NP2OZF8qR1 UOONLlZ6N95PwVQk3XhF8vdWslsaTCK2WH/+ndJZrm8L4rKEwlNuGVdLIUXr5e5FZW+V YuAVQNs61gR1kprV71AXt0yF9141CcXlGBQruuGLtlu62PcYbNKo+CZ1L9GfZgTCiLHW fyvyXh3AWjvFiIrePHjyxSGVfub8bj6ID621WznkUg7zpuRxpWGvYMUBQeeEHKZ9qY/c W2uA== 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 :dkim-signature; bh=64jyYKbiHwigXyDTu3oq+4Khg+BRvXJOJwAy8Ko++yY=; b=tlWcKZXghOHPxMqLNE0y1CIuWSyPPxFM36DMtdeyYoiHciobLtKdiUaDWD8BC3wyVl XxA83QcCWleSbh5yKCiC98/t+L6141xOHS3hVotks1bRoZv+dkUkzczUQsxiDgSLzA1S N3m1nIKwMJE5yOqHMp966ikoDd6fgtnB2N0wSr793xpbjbggL1WNGpp7kj9f7YiEqppM ygdo8/EgadQN6+oSVS2bi2jcylonuB6gtZ+0+pSgDiuGkPNpkD2aUjoTjH2d5lw3+LDX sKMmNUE4bqvkkdVlCZWj76WfsBg9EIuVizFwHlmqT17hoHVJHHQibIPqx+ZEKeNn7C+L 71/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LLH25lEp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c34-20020a631c62000000b004231ae0167dsi1743493pgm.69.2022.08.18.10.18.46; Thu, 18 Aug 2022 10:18:58 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LLH25lEp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345092AbiHRQsX (ORCPT + 99 others); Thu, 18 Aug 2022 12:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345059AbiHRQrx (ORCPT ); Thu, 18 Aug 2022 12:47:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C21F6C697E for ; Thu, 18 Aug 2022 09:47:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2118861616 for ; Thu, 18 Aug 2022 16:47:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E37F9C433D6; Thu, 18 Aug 2022 16:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660841244; bh=TOzmBUEyJkFq8BX4F3WOSMODGQe0Ba5ENH0sx85QamI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LLH25lEpgr2dMgoKRLVa5sV7uD7QbcSjlsoML0BE3YJgHOw4bNv18wV4xwemwNYk9 6AJSWHFQ3vI+SyxlslrKJMcJZvFMtVZTC/PToXpElifvn3YClsfz2AoPwJGPTBN3+Q Y01N1HFicGjAzSz2/d0KuYOtCW88ctTocyT+GOMUapTOtnTdjAJs/hPv56bFWXeYe0 o1MJU2aAX0xWqoM50OayLwwNOACLQr1oTMuKIT9PdbQhW+5tbGpWjpeYWdTUEa64Gp F/f53FsfZZxzfwALuucn9/9j3vkb227bGsx4kUb+w44cVfy0naZIkS8mlZAiTyUqME ZZFxmfPs/e4jA== From: SeongJae Park To: Baolin Wang Cc: sj@kernel.org, akpm@linux-foundation.org, muchun.song@linux.dev, mike.kravetz@oracle.com, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] mm/damon: replace pmd_huge() with pmd_trans_huge() for THP Date: Thu, 18 Aug 2022 16:47:22 +0000 Message-Id: <20220818164722.51448-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Baolin, On Thu, 18 Aug 2022 15:37:44 +0800 Baolin Wang wrote: > The pmd_huge() is usually used to indicate if a pmd level hugetlb, > however a pmd mapped huge page can only be THP in damon_mkold_pmd_entry() > or damon_young_pmd_entry(), so replacing pmd_huge() with pmd_trans_huge() > in this case to make code more readable according to the discussion [1]. Thanks to Baolin and Muchun for the discussion and this patch! > > [1] https://lore.kernel.org/all/098c1480-416d-bca9-cedb-ca495df69b64@linux.alibaba.com/ > > Signed-off-by: Baolin Wang Reviewed-by: SeongJae Park Thanks, SJ [...]