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 95AD7EE49A8 for ; Mon, 21 Aug 2023 08:44:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1EA7C6B0083; Mon, 21 Aug 2023 04:44:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 19A926B0085; Mon, 21 Aug 2023 04:44:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 063E18D0001; Mon, 21 Aug 2023 04:44:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E74E46B0083 for ; Mon, 21 Aug 2023 04:43:59 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A60F01402E4 for ; Mon, 21 Aug 2023 08:43:59 +0000 (UTC) X-FDA: 81147474198.01.4835BC7 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by imf08.hostedemail.com (Postfix) with ESMTP id 7EF84160010 for ; Mon, 21 Aug 2023 08:43:57 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jY1YEV1v; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692607437; 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=6MAqdqlRKM5Dtn6WLPkbn+5nishTIMEamYOB+8IssJ4=; b=e2aSWOyb9Ts+h19gwHARCVI+2VaPoPabh5iSXXkggrK8yXi/spOAQBVZuCp7InnsjRmewl tfH4GzAn7HYoV3UzKwbGCm1rrE/DMTkjj723TPZ5nLa1aYyaYMcrbQBFit0u1aFRpgVg0B 5mC8KIZ3X2lRMFMuk8AxhlBNboXAels= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jY1YEV1v; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692607437; a=rsa-sha256; cv=none; b=f8wfqeq6mgz0xYikuUR3HS45Vsi3qvfWGZUV40xA2ZOpioDfOFGp9+AkCsFKycw6CarzTp vVAg6dFJzTkAqJ/EOZQepSy/hoUBGp5IW74IyAdWRMCv2N+ZxgDLNB5n1UzVGSBSxyjU5P UQ0BPFv1J3SG1SE57rpVYD+HGAAmiEY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692607437; x=1724143437; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=96ujsT2KRPpjwIeo5kcJRKomo2SFukpqWw6NbNSqEq4=; b=jY1YEV1vaH7sjd7wkuFFKOwOUn/6G6Jrzm61WvOtr9bv3WGK8/95CwSi xe3ZFkOksIo1sGBsDL9pQafN5w7GxR028fvNtadC+syqnGQw4PjDKCFS2 4XbKW+mqfuCq87GZuVlHhRJBSBeSzXZKpwuMr3yNpxXvQ9/mSO/Yt/+JJ 1SP0uQoDwRtECYl8IP4uymJrTxYLaJkrg96ZACBSUdPJ2S1NnnTWEWaI7 FKVfIq8EbJ0FIqYVnimyMpuSMR+wP68frQJOxXOhO97g97Vti6skC2NB6 QXiYzkJC0m7NXUX9Q0V2OboqZwYwNJ0/EyJUUr5Aksy6sqywzKgGiGdpA A==; X-IronPort-AV: E=McAfee;i="6600,9927,10808"; a="377273385" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="377273385" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2023 01:43:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10808"; a="859408462" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="859408462" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2023 01:43:53 -0700 From: "Huang, Ying" To: Baolin Wang Cc: , , , , , Subject: Re: [PATCH 0/4] Extend migrate_misplaced_page() to support batch migration References: <87cyzhdt5r.fsf@yhuang6-desk2.ccr.corp.intel.com> <21099f59-c660-41a3-e422-0c14ac5d0fac@linux.alibaba.com> Date: Mon, 21 Aug 2023 16:41:47 +0800 In-Reply-To: <21099f59-c660-41a3-e422-0c14ac5d0fac@linux.alibaba.com> (Baolin Wang's message of "Mon, 21 Aug 2023 16:10:08 +0800") Message-ID: <87r0nwdbxw.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-Server: rspam09 X-Rspamd-Queue-Id: 7EF84160010 X-Stat-Signature: yr76xk3dfmfry7pmxit575pmt4tzdxey X-Rspam-User: X-HE-Tag: 1692607437-208846 X-HE-Meta: U2FsdGVkX1/Az59qiYJqN0iOSEcnmjU3b2TA9o196MBiB9VCbPWNUaE/B6k1SbucuR2nt8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x6KqqG4xVkoM3yslcKGGh9o2k8mPgpdtypSI1NniIwbZtSYhWbMWtqcs0lKDxgdsCHEb0zysRcYCaxG4X6Lk2+gouDHl24Rm32zc2e7+ivEbgU0KwEkFKkaX1cDSh2RVOKSdGQs8j7dXPY8n+kPFWfA+OFc+97v6emKe8i8w8+MI44VGdSa0mQfCemHCxO8Abx1V4PIRsbqmJCRUpnhsORNXj0GEnKiiU= 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: > On 8/21/2023 10:29 AM, Huang, Ying wrote: >> 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 hope these cleanup can also benefit the compound page's NUMA > balancing, which was discussed in the thread[1]. IIUC, for the > compound page's NUMA balancing, it is possible that partial pages were > successfully migrated, so it is necessary to return the number of > pages that were successfully migrated from > migrate_misplaced_page(). (But I did not look this in detail yet, > please correct me if I missed something, and I will find some time to > look this in detail). That is why I think these cleanups are > straightforward. > > Yes, I will post the batch migration patches after more polish and > testing, but I think these cleanups are separate and straightforward, > so I plan to submit the patches separately. Then, please state the benefit explicitly in the patch description instead of just preparation for batching migration. -- Best Regards, Huang, Ying > [1] > https://lore.kernel.org/all/f8d47176-03a8-99bf-a813-b5942830fd73@arm.com/ > >> 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(-)