Message ID | 20230610034114.981861-1-linmiaohe@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1333310vqr; Fri, 9 Jun 2023 20:51:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nPQoDNCvW1ZyBxEVhIKcGmivHljObK2avjDGgik8rv2YOC1WdY/ywiid8DGj+13xHzUb9 X-Received: by 2002:a05:6a00:2342:b0:659:f4ed:42bc with SMTP id j2-20020a056a00234200b00659f4ed42bcmr4431549pfj.4.1686369104496; Fri, 09 Jun 2023 20:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686369104; cv=none; d=google.com; s=arc-20160816; b=grhpxCzUZwnKKxnFBjSnQMbS1TLjmZ4AWxoLuLJx/fJjx0RSTdCAz7mAzpr+5lth6C I3JtGBy7UrhlJTR0FlID05FIqVhJ8+e0pT8X8NUwuyZ/Sq47Nqoq+V8y+BhLXgdGLP3C TUzPVqihzxALwr1aRbIlJqXkPB5cv5uFCu2vm9RWvqjAlrYG77my4E8oxhjR/yq7AryH BV+1cVMkRX9HPY96XzzFTBUXYRX42sO8mzdStmSXQOXkC9+DNQmCo2zkIOXVVOTv+FyW Sqhqqqoktwo3fwy2MlPgUQxU2Xtw10GFPB9OPhhAC5CtQA7zcpEapHpWJe6As4WnOixO MDsg== 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 :message-id:date:subject:cc:to:from; bh=0WC5eJf881lg5xWp2hVCMycy1Gd6UhhBlGV+Btx3tQo=; b=Z1N/1GLCBu2jf9Q0Wi6mEy1aorWbfyxA3jHKHL/Ebfc03grgmUad+I4AeRHOKAWgqV Fz1WA0X4CglM4UKIpu3/DpnWA/21puC+JZMa602eYlT6P6gn7fQu8RNh25EZWXO19Q+Z 7YA1oO0pZ59UbXdlml4BDOWBHyJZNr8lzTy98lE/wwcqFGI9AasQ9olNl07HEQhjfaCX yC0ArbQ0GizjaCB286CJFUpdDD3+SeEJkTkmhMTkA0HP2onaL0Ti+GA+kxBO7ykvP4z1 rVgKPVLVzkSgKI24gzFj0E7c0HIcQe21Q4hiJ0rMMTrIk18Bro+gXyKVe0rOV0vMxjJJ uBlA== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020aa7954f000000b0063d3aed5eb8si733565pfq.140.2023.06.09.20.51.32; Fri, 09 Jun 2023 20:51:44 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjFJDli (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Fri, 9 Jun 2023 23:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjFJDlg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Jun 2023 23:41:36 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8A6CD8 for <linux-kernel@vger.kernel.org>; Fri, 9 Jun 2023 20:41:34 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QdNxF5lsczLmlc; Sat, 10 Jun 2023 11:39:45 +0800 (CST) Received: from huawei.com (10.175.104.170) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 10 Jun 2023 11:41:31 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org> CC: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linmiaohe@huawei.com> Subject: [PATCH] memory tier: remove unneeded !IS_ENABLED(CONFIG_MIGRATION) check Date: Sat, 10 Jun 2023 11:41:14 +0800 Message-ID: <20230610034114.981861-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768286170514619052?= X-GMAIL-MSGID: =?utf-8?q?1768286170514619052?= |
Series |
memory tier: remove unneeded !IS_ENABLED(CONFIG_MIGRATION) check
|
|
Commit Message
Miaohe Lin
June 10, 2023, 3:41 a.m. UTC
establish_demotion_targets() is defined while CONFIG_MIGRATION is
enabled. There's no need to check it again.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/memory-tiers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 10.06.23 05:41, Miaohe Lin wrote: > establish_demotion_targets() is defined while CONFIG_MIGRATION is > enabled. There's no need to check it again. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > --- > mm/memory-tiers.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c > index dd04f0ce5277..a516e303e304 100644 > --- a/mm/memory-tiers.c > +++ b/mm/memory-tiers.c > @@ -366,7 +366,7 @@ static void establish_demotion_targets(void) > > lockdep_assert_held_once(&memory_tier_lock); > > - if (!node_demotion || !IS_ENABLED(CONFIG_MIGRATION)) > + if (!node_demotion) > return; > > disable_all_demotion_targets(); Reviewed-by: David Hildenbrand <david@redhat.com>
On Fri, Jun 9, 2023 at 8:41 PM Miaohe Lin <linmiaohe@huawei.com> wrote: > > establish_demotion_targets() is defined while CONFIG_MIGRATION is > enabled. There's no need to check it again. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Yang Shi <shy828301@gmail.com> > --- > mm/memory-tiers.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c > index dd04f0ce5277..a516e303e304 100644 > --- a/mm/memory-tiers.c > +++ b/mm/memory-tiers.c > @@ -366,7 +366,7 @@ static void establish_demotion_targets(void) > > lockdep_assert_held_once(&memory_tier_lock); > > - if (!node_demotion || !IS_ENABLED(CONFIG_MIGRATION)) > + if (!node_demotion) > return; > > disable_all_demotion_targets(); > -- > 2.27.0 > >
diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index dd04f0ce5277..a516e303e304 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -366,7 +366,7 @@ static void establish_demotion_targets(void) lockdep_assert_held_once(&memory_tier_lock); - if (!node_demotion || !IS_ENABLED(CONFIG_MIGRATION)) + if (!node_demotion) return; disable_all_demotion_targets();