From patchwork Thu Nov 11 07:48:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 12614369 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A00B2C433EF for ; Thu, 11 Nov 2021 07:48:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4754361284 for ; Thu, 11 Nov 2021 07:48:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4754361284 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 841606B007E; Thu, 11 Nov 2021 02:48:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 816F46B0080; Thu, 11 Nov 2021 02:48:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69E546B00A6; Thu, 11 Nov 2021 02:48:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0193.hostedemail.com [216.40.44.193]) by kanga.kvack.org (Postfix) with ESMTP id 5A1FC6B007E for ; Thu, 11 Nov 2021 02:48:50 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 13DB182499B9 for ; Thu, 11 Nov 2021 07:48:50 +0000 (UTC) X-FDA: 78795872820.12.E6B6B96 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by imf22.hostedemail.com (Postfix) with ESMTP id A65E6191C for ; Thu, 11 Nov 2021 07:48:48 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R471e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Uw0LcRv_1636616924; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Uw0LcRv_1636616924) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Nov 2021 15:48:45 +0800 From: Baolin Wang To: akpm@linux-foundation.org, ying.huang@intel.com, dave.hansen@linux.intel.com Cc: ziy@nvidia.com, osalvador@suse.de, shy828301@gmail.com, baolin.wang@linux.alibaba.com, zhongjiang-ali@linux.alibaba.com, xlpang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Support multiple target nodes demotion Date: Thu, 11 Nov 2021 15:48:33 +0800 Message-Id: X-Mailer: git-send-email 1.8.3.1 Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: A65E6191C X-Stat-Signature: 5o1csnk48n3jcr9quo4f7mp4figoh59u X-HE-Tag: 1636616928-983809 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: Hi, This patch set is used to support multiple target nodes demotion if a system has multiple slow memory nodes. Please help to review. Thanks. Changes from v1: - Add a new patch to allocate the node_demotion dynamically. - Update some comments. - Simplify some variables' name. Changes from RFC v2: - Change to 'short' type for target nodes array. - Remove nodemask instead selecting target node directly. - Add WARN_ONCE() if the target nodes exceed the maximum value. Changes from RFC v1: - Re-define the node_demotion structure. - Set up multiple target nodes by validating the node distance. - Add more comments. Baolin Wang (2): mm: migrate: Support multiple target nodes demotion mm: migrate: Allocate the node_demotion structure dynamically mm/migrate.c | 158 +++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 122 insertions(+), 36 deletions(-)