From mboxrd@z Thu Jan 1 00:00:00 1970 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 53EA0EE49AA for ; Mon, 21 Aug 2023 02:32:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9DADC8D0005; Sun, 20 Aug 2023 22:32:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 964008D0001; Sun, 20 Aug 2023 22:32:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 803458D0005; Sun, 20 Aug 2023 22:32:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6D7EB8D0001 for ; Sun, 20 Aug 2023 22:32:03 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4A89E1201DC for ; Mon, 21 Aug 2023 02:32:03 +0000 (UTC) X-FDA: 81146536926.29.5077844 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by imf24.hostedemail.com (Postfix) with ESMTP id 344F9180008 for ; Mon, 21 Aug 2023 02:32:00 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lMH+GyG6; spf=pass (imf24.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692585121; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fEpt9Ts3mQ0PYjhaGqdZUHoZq/0uBfqAs2o32k96kHg=; b=4P8/8lJRiW36vc1QTuaDLep1INqLv1JybSbNuHuo/mTy+UwfptwWGb0FFCTFYr3RiCZLyh wPaP6sK7LZxdc+VkY573IdFGWYTWTgLEbu4Ulu8vOUMt91WxgD8GJSnjQnhO/KHLWxO+LT 86t3dNKsK15Ka1kcSo9n1ktY/vg5HCU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692585121; a=rsa-sha256; cv=none; b=bfJzht33iAAhHmtQT7ZmSbws+Q4rAFyW33FFwbx5YZkdRwrc4t4KPfPm4aEt1bQqAzlNdh y0LhDcXqFM7znyXHLJjmj4OxzePNRB80rbuLJhqKvVK3/OmYWG0XZEBXJs8XX3bWC9kuRy d2yc35kc9veimnrtkgZNLYOp61zqwaQ= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lMH+GyG6; spf=pass (imf24.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692585121; x=1724121121; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=rOsOn2g8PU/rMT6eZ1g1pj2lVKXIGech1fG5c6FeRg0=; b=lMH+GyG646WzublHCmHpTWjwhrMe22LyRNS/UCFB+uwh+A7bzdWL9rFY 9QdTboXeQF9OHj8ex676AJVfG822tkIdIwNoDXo7a37hgjDc/NjGIwT6f hWbu1Tp+LKJBJbtJXRCnlXKYtR2562cLGUrCT3LD5lmI07fpNr9NY0050 Wr3E317DZ0nsDXciPckdmh0cDG3bJ5KnielF4JZkiCvnqx8N8lqXoBbWT P/ggn510Bam+7Umgje/wAiE10kSW8/kYIjQxctM7BeHokPxQAh3RgnbA3 E2qvXkJMGrrCIlbIqSHsRndjww/cP/yegPPOZJpPCKz7HFPIW6TCZDb0K A==; X-IronPort-AV: E=McAfee;i="6600,9927,10808"; a="377215931" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="377215931" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2023 19:31:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10808"; a="909525259" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="909525259" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2023 19:31:57 -0700 From: "Huang, Ying" To: Baolin Wang Cc: , , , , , Subject: Re: [PATCH 0/4] Extend migrate_misplaced_page() to support batch migration References: Date: Mon, 21 Aug 2023 10:29:52 +0800 In-Reply-To: (Baolin Wang's message of "Sat, 19 Aug 2023 18:52:33 +0800") Message-ID: <87cyzhdt5r.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Queue-Id: 344F9180008 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: h6z4fpjh1sj8zkpfpdd773cu9bpkdses X-HE-Tag: 1692585120-615392 X-HE-Meta: U2FsdGVkX1/aZM1NTYg8c7bs8XnPJUbHP3zzwQ8XK06f5r/K/qcMeZX0znnFJvW4wlgb3NzlG+JX6dbp1M4R9MPtqZ+x7Ul//3PHeNAgKZ7A/R3J7SbyvjM36NTKyK2dJ2QBMjbbXGCa0zQY4xQKc09RQ7w0fDgmOciWMIpfkhXOThIEDwc115Drp5tqBT+jhk1fD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QiiwIdlK8tUjq6m6qvEq0aWYKXra/prsGbK6nK/GjwevJ39f1lEOk 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: Baolin Wang writes: > Hi, > > Currently, on our ARM servers with NUMA enabled, we found the cross-die latency > is a little larger that will significantly impact the workload's performance. > So on ARM servers we will rely on the NUMA balancing to avoid the cross-die > accessing. And I posted a patchset[1] to support speculative numa fault to > improve the NUMA balancing's performance according to the principle of data > locality. Moreover, thanks to Huang Ying's patchset[2], which introduced batch > migration as a way to reduce the cost of TLB flush, and it will also benefit > the migration of multiple pages all at once during NUMA balancing. > > So we plan to continue to support batch migration in do_numa_page() to improve > the NUMA balancing's performance, but before adding complicated batch migration > algorithm for NUMA balancing, some cleanup and preparation work need to do firstly, > which are done in this patch set. In short, this patchset extends the > migrate_misplaced_page() interface to support batch migration, and no functional > changes intended. Will these cleanup benefit anything except batching migration? If not, I suggest you to post the whole series. In this way, people will be more clear about why we need these cleanup. -- Best Regards, Huang, Ying > [1] https://lore.kernel.org/lkml/cover.1639306956.git.baolin.wang@linux.alibaba.com/t/#mc45929849b5d0e29b5fdd9d50425f8e95b8f2563 > [2] https://lore.kernel.org/all/20230213123444.155149-1-ying.huang@intel.com/T/#u > > Baolin Wang (4): > mm: migrate: move migration validation into numa_migrate_prep() > mm: migrate: move the numamigrate_isolate_page() into do_numa_page() > mm: migrate: change migrate_misplaced_page() to support multiple pages > migration > mm: migrate: change to return the number of pages migrated > successfully > > include/linux/migrate.h | 15 ++++++++--- > mm/huge_memory.c | 19 +++++++++++--- > mm/memory.c | 34 +++++++++++++++++++++++- > mm/migrate.c | 58 ++++++++--------------------------------- > 4 files changed, 71 insertions(+), 55 deletions(-)