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 1A234C433F5 for ; Fri, 22 Apr 2022 06:27:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D6D66B0073; Fri, 22 Apr 2022 02:27:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 886396B0074; Fri, 22 Apr 2022 02:27:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 776846B0075; Fri, 22 Apr 2022 02:27:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 697246B0073 for ; Fri, 22 Apr 2022 02:27:53 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2148FA6D for ; Fri, 22 Apr 2022 06:27:53 +0000 (UTC) X-FDA: 79383534426.09.B0F4B6B Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf27.hostedemail.com (Postfix) with ESMTP id 5FA0340026 for ; Fri, 22 Apr 2022 06:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650608872; x=1682144872; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=7FKlaBGgHn2LiVjGfAUlft1h9xE8gkk5PntmcCX/1as=; b=dOAYan1CXeig+31r10pyb1U7uxIPb8zRXPNGH1wB9JxvicsY6qUrJN12 LslL0qWhgGoNmq9GZuKLu8WGmswvEkSvEUYWAiKgS/dFPjq5DRxHaz25U kbcRFFqk0XeSpEmAxs8oZg0J5dPQPaKo097+6GS2FFNpWxlmJE2ii33GC XUPVQONJzc0ToweNc1rM6N1cs43uS97dD95lerhLoN8DfQZJoMf5/lqfw cB9xqp73kzxkdzAYv5zyaFDXk129D4YT9/aLpYxYPR0fVqBn+zdPgGsJb 3QpTVYjHKsJyO4SpNGI8ZoS6wusiMmKCpD3tDPgvmMfJ5rf4x+p45Z6xU g==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="264364262" X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="264364262" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 23:27:50 -0700 X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="530688715" Received: from jiejingx-mobl1.ccr.corp.intel.com ([10.254.215.31]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 23:27:48 -0700 Message-ID: <4f1bc4dc65117a185833555ff8df30a944453499.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 14:27:45 +0800 In-Reply-To: References: <20220407020953.475626-1-shy828301@gmail.com> <6f7210be7353d1c01dc9f872b2692b83f87f5452.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 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=dOAYan1C; spf=none (imf27.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.65) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: qdmdd5fhxskgye693c94mjyn33w86o31 X-Rspamd-Queue-Id: 5FA0340026 X-Rspamd-Server: rspam04 X-Rspam-User: X-HE-Tag: 1650608871-167580 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: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 swap device support too to make sure per-node support has performance impact on this system. Best Regards, Huang, Ying