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 338EBEE49A8 for ; Mon, 21 Aug 2023 08:50:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B8B596B0087; Mon, 21 Aug 2023 04:50:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B3CF36B0088; Mon, 21 Aug 2023 04:50:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2AB68D0001; Mon, 21 Aug 2023 04:50:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 945006B0087 for ; Mon, 21 Aug 2023 04:50:18 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 5DF381A087D for ; Mon, 21 Aug 2023 08:50:18 +0000 (UTC) X-FDA: 81147490116.06.471149D Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by imf07.hostedemail.com (Postfix) with ESMTP id 9D5CE40015 for ; Mon, 21 Aug 2023 08:50:14 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf07.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.99 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692607816; a=rsa-sha256; cv=none; b=eCwlUx088mQTCotu5pOEJAwXPqxgKFV6w4DARpyfGKaGTISEsHJc1G3Ani1M21jyEcufaj vzOX32FAI/JA1nvh4PLE4qVUgpF0nCtiSrS0utSGnTnHaGSEy7SLbOH7K7N7wGH6GkqckG YmKUpzfYpC0Ueomvf1KpE4X3y2Xlwnc= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf07.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.99 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692607816; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=66hJAWemB5OqQxz/YnctHZ7jW/1Db7b9hBw412fT4cQ=; b=atOIg9SCYxLjS0YIZ6jvXKMxG/60tM8uv/89GHaTQkmsJLRgQLFsX7Jn5sT38rnLQz8/tF bAXSuwpMVGH6nAGqEJqAckh8bciieDhG23xi9F0cW4BjAkK2bW8i37hP4vcH2Hfl48P4Du 2vOai/cw5R7zIaOe1HXYbJWhPnTQCYw= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VqF1WK9_1692607809; Received: from 30.97.48.69(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VqF1WK9_1692607809) by smtp.aliyun-inc.com; Mon, 21 Aug 2023 16:50:10 +0800 Message-ID: <9749af5b-8c0b-49e4-d76e-129736472499@linux.alibaba.com> Date: Mon, 21 Aug 2023 16:50:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH 0/4] Extend migrate_misplaced_page() to support batch migration To: "Huang, Ying" Cc: akpm@linux-foundation.org, mgorman@techsingularity.net, shy828301@gmail.com, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <87cyzhdt5r.fsf@yhuang6-desk2.ccr.corp.intel.com> <21099f59-c660-41a3-e422-0c14ac5d0fac@linux.alibaba.com> <87r0nwdbxw.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Baolin Wang In-Reply-To: <87r0nwdbxw.fsf@yhuang6-desk2.ccr.corp.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 9D5CE40015 X-Stat-Signature: wx7gpdrcujeisqyo7crssae3jh5uj3ns X-Rspam-User: X-HE-Tag: 1692607814-241069 X-HE-Meta: U2FsdGVkX19l3e63iExpfLbU0QwDXxDtpupLgDYjAmdG7LmKfEr4J+MXvdO2L0Os43custCKEzVAr9n4g1xR9mf7Iet5VDsbU6fe/nyB/rJ0v0S2TFfn8q2iURfTLy6XhD3wNURH7Zay7v9NQMZPFKpD6XXFiZlc5XParAmxla2DrUY0daafbIXTIxTIma9jyf/e+pSlKRFofOIbl7YbhJc4MFFpM3JiuO4WCqP1nA+fsk0IT3xXoUnYtZ3/zQUs4AFFvBsvhj1SxLhsm7Os24gKgcf1+NDxLQc/GRMtl3vi+C8RkbJQ4vBLQEJFQk9jBt3Nok/N4v2eT25vrcZzUsxL0j97Mi0RQb31m0gXcG9M5zvTkI0F9Jsh62ztXl0t7k/wZ01XbbYxzttg0Lu1YQkFn4CzDf4ywdGAlyefV8xshkaTMz3YgUJiDc+wrhu6sq4nJ4ueKOXhMrVClpLtO/QRFeIUi/9ucOCi39vb75ZsSuViExMLRUzMheHzPWKEMSwDMTXiWOeQrcXJDXJ0nrcWmUtwrjrzu9jMF4LDjDF0XyQqMvGZ2g/DWbrGNvRuKDhNnP1cKfz4hq7FlETWtOtKZ0Y5aEqed11nQfGG/5LojD+uwZ6Yrqsdiknn3sR1GmkVcQi4sBG5cPem1PGhtS4XYOuvr4wLiNolr0QPTQg7kkesl2x5loRvxdxoWA/3vm7Mcv9I7fdmIov5X7XEJ1QKMO2vuFkNOP5COoqYoCQ0VoFBeD7c0Dzaz+mimLsX+Zn/mUmg7/yVj/yZQ3ZRzBYIujHxoaoIg8rnkqfhm9mqFVu5buC+SkQWc+8LeSFunc3M8kRj7DI7hND/6O1aR13UEPM2yiMOz66cKZlLSmtdiXcQFLml7lxYQLujM4fUPLuM7g+milbCqRuL9iZ6FC0dmcjfT/3l8chMgZFrGrxBnCC+o7BUcUjuNMD3IT0SS2qGC1H57NFSegk7sxR s4YKR5HV bgbYXlqyDAeUrpdd2FojCipeyeJGUO48g730wLOrJLaTZ+S0EAnDAAIjhMF63xHnkpxiYq5mKyvrB3nENdu4vJjxQn1mhPhB4drDjEUed0jK/f4mkdzqzAX0MaNfvvZmKarMEhel/MJY37/IpAH4qgr8izw== 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: On 8/21/2023 4:41 PM, Huang, Ying wrote: > 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. Sure, will do. Thanks.