Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp838700pxb; Fri, 22 Apr 2022 12:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy04iNW829T9NVQghbZ+wcJSVWtF9M8uJZ7lxPJ+Wus5n+bK5XoX8Zpc80dmJEKfAxFGMj2 X-Received: by 2002:a65:4503:0:b0:382:aad5:ad7d with SMTP id n3-20020a654503000000b00382aad5ad7dmr5228940pgq.488.1650654978967; Fri, 22 Apr 2022 12:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654978; cv=none; d=google.com; s=arc-20160816; b=ZtEXSXux2YcqtU4a5ptdp8fVs67C8+99JSIp5PMgAqMXzcG1SoEdJPgawHC7NAsM3c MEnSnjWS8+mluSijJOyWM4qtRPLjrUEL0A9Oc6oiREjebmqhhipfDpSUtq7xbdHcnDzz zjUf2wA1+AoKftAgoC+/2rKr470WvgbNawOx+N1vYEa6NIFmfSxoBAZbLrqC3+rdpiXi Uizie6psMAuY/t0RMwUAk4XHexPtpYEaEYPG59RD4yopI3JgobNWt+qgi9ziJ/XDSyHy 8/GQ7/0W+pbmogKBtnVGB6oRneuve+IV5kpkmDjhWcFwA/uZiYAqkOOO07D++sKik9Pz +ptA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=5FnZdymzNBA2mde9Wlh2pE0ayTgskMOQbfhh/pBmFC0=; b=epWWPeCAykkV2snCEZzQbgWImyDlYB753az8jtF18MXxuiB3OpLf2Yi6oKPGfX1yvw Xnj1iwP5J/IvJ9K6Ff/f46fq1WBtgx4V3DhpYXwUnG5tDIBddaQ6y1xJ+BTqr0Iw3rGt Q+smreFAfVnry3wu1PWtZUzWL8qiV0OSuBpFHtmYtAGwkEbwHy7WMmSI0lILS8Ex8NGr dOmXlSIKUYERm2OnB7BDJMxLT8Xe8iq+Anp4aGoQVTfXjKYxMl7k9PTrobC9AfLZLm4r gQjSrmQqOQO7+PMCzgVpeCPH3WoNHWYVNlAtGWbJA88MH9G7JLIXeF3NusNx31prWKU5 jLdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hNaylbzS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j13-20020a17090a7e8d00b001cb8774b6c3si10707958pjl.56.2022.04.22.12.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:16:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hNaylbzS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5D0241B5BD5; Fri, 22 Apr 2022 11:32:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444815AbiDVH37 (ORCPT + 99 others); Fri, 22 Apr 2022 03:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444814AbiDVH35 (ORCPT ); Fri, 22 Apr 2022 03:29:57 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8EC750456 for ; Fri, 22 Apr 2022 00:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650612419; x=1682148419; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=wLNhONK5TAmECoDZG9Iy5HImqEg6MTqsIAu6jAkvhck=; b=hNaylbzSh/DjxBRg64ZyPbvpTnH8bYSJTKZh1RCVNjoXiysji8R0JK9I bYtkeagsByzeaKVFG2Cnl4kSe1Nlt9/aP/5DEkqrlCQ63EFDuqMOsd5fZ PwporKcfQXpokw4um57MR+Ld3k9srjnKxNekFiqYs9ACgL4y4/U7i9tlK iZ3ZbrF+7CpKEQ1B9QLrcMa/vwb2Gu8d8tG1rvbD0I7mxBARMQVKmSPBk a7/F+6EXAfcUqURiwRF0TAiwiFrfmEd7Gm1pRXg2au73Z1WDrjZi9mlzL a2YEWPWM41M+w34o7AE94/D/EstB/vloZ4tMkcjLAduIUeNAYNH6/SapI A==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="245177389" X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="245177389" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.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-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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