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 58455C433EF for ; Fri, 22 Apr 2022 07:27:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C66BE6B0075; Fri, 22 Apr 2022 03:27:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BEF406B0078; Fri, 22 Apr 2022 03:27:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A688D6B007B; Fri, 22 Apr 2022 03:27:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 922266B0075 for ; Fri, 22 Apr 2022 03:27:01 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 5EDB6120AF8 for ; Fri, 22 Apr 2022 07:27:01 +0000 (UTC) X-FDA: 79383683442.06.543DE1C Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf21.hostedemail.com (Postfix) with ESMTP id 2C8341C0006 for ; Fri, 22 Apr 2022 07:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650612420; x=1682148420; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=wLNhONK5TAmECoDZG9Iy5HImqEg6MTqsIAu6jAkvhck=; b=lm6n8FRMVfqUOz2LXJhSJNYlp/RqDxigW/I7Eqx7HftQP45KPTQL7fOp ndX8P5wEG5/mK47tLc1u88K3c4z29KtbaqH7391At5xgPWLL54Iy5MKbE jjhlNpvWmfJPHrl3XwDAgPhS+SyIDvIjPqj2GAtrIKuQncPmK7sUMnhcA pSej2cHCKrz7ZfDsxuz2DjMwLnImOkRw0oJqGX/DtpIMoCeLt1pEYe7Jh V1EtUlfB3HiZIQ/wA0dqucnRYSWVlL9f/4BfbEJ3FFx+wb9Z45UAKF7rg 4XlYzKIE8B9UW6Eomktp+lG94wDhzoDprhbcW32AksqtEi1a/HUy/E5Ya A==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="263454344" X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="263454344" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 00:26:59 -0700 X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="577725109" Received: from jiejingx-mobl1.ccr.corp.intel.com ([10.254.215.31]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 00:26:56 -0700 Message-ID: <327e5029c5724132191e5b4b7d6e00a4ffa26117.camel@intel.com> Subject: Re: [PATCH] mm: swap: determine swap device by using page nid From: "ying.huang@intel.com" To: Aaron Lu Cc: Yang Shi , Michal Hocko , Andrew Morton , Linux MM , Linux Kernel Mailing List Date: Fri, 22 Apr 2022 15:26:51 +0800 In-Reply-To: References: <20220407020953.475626-1-shy828301@gmail.com> <6f7210be7353d1c01dc9f872b2692b83f87f5452.camel@intel.com> <4f1bc4dc65117a185833555ff8df30a944453499.camel@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2C8341C0006 X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lm6n8FRM; spf=none (imf21.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 192.55.52.120) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: 68nfidg7p6obnuh46ym9888dqhdcmks9 X-HE-Tag: 1650612418-953318 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 Fri, 2022-04-22 at 14:43 +0800, Aaron Lu wrote: > On Fri, Apr 22, 2022 at 02:27:45PM +0800, ying.huang@intel.com wrote: > > On Fri, 2022-04-22 at 14:24 +0800, Aaron Lu wrote: > > > On Thu, Apr 21, 2022 at 04:34:09PM +0800, ying.huang@intel.com wrote: > > > > On Thu, 2022-04-21 at 16:17 +0800, Aaron Lu wrote: > > > > > On Thu, Apr 21, 2022 at 03:49:21PM +0800, ying.huang@intel.com wrote: > > > > > > ... ... > > > > > > > > > For swap-in latency, we can use pmbench, which can output latency > > > > > > information. > > > > > > > > > > > > > > > > OK, I'll give pmbench a run, thanks for the suggestion. > > > > > > > > Better to construct a senario with more swapin than swapout. For > > > > example, start a memory eater, then kill it later. > > > > > > What about vm-scalability/case-swapin? > > > https://git.kernel.org/pub/scm/linux/kernel/git/wfg/vm-scalability.git/tree/case-swapin > > > > > > I think you are pretty familiar with it but still: > > > 1) it starts $nr_task processes and each mmaps $size/$nr_task area and > > >    then consumes the memory, after this, it waits for a signal; > > > 2) start another process to consume $size memory to push the memory in > > >    step 1) to swap device; > > > 3) kick processes in step 1) to start accessing their memory, thus > > >    trigger swapins. The metric of this testcase is the swapin throughput. > > > > > > I plan to restrict the cgroup's limit to $size. > > > > > > Considering there is only one NVMe drive attached to node 0, I will run > > > the test as described before: > > > 1) bind processes to run on node 0, allocate on node 1 to test the > > >    performance when reclaimer's node id is the same as swap device's. > > > 2) bind processes to run on node 1, allocate on node 0 to test the > > >    performance when page's node id is the same as swap device's. > > > > > > Ying and Yang, > > > > > > Let me know what you think about the case used and the way the test is > > > conducted. > > > > The test case looks good to me. And, do you have a way to measure swap > > in latency? Better to compare between enabling and disabling per-node > > By swap in latency, do you mean the time it takes for a fault that is > served by swap in? > > Since the test is swap in only, I think throughput can tell us the > average swap in latency? > Yes. Given the same parallel level, the average swap in latency can be reflect via throughput. > > swap device support too to make sure per-node support has performance > > impact on this system. > > I think we can tell by conducting two more tests: > 1) bind processes to run on node 0, allocate on node 0; > 2) bind processes to run on node 1, allocate on node 1. > If case 1) is faster, we can say per-node support has performance impact > on this system. At least we can measure whether cross-node latency matters with this test. Best Regards, Huang, Ying