Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp351389pxb; Fri, 22 Apr 2022 02:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ3y+e+Y6lLZKwM80+S07UBg4a7aAg5jGd2aLD1hIBx9easnhfo1VWk1gXnxuNw2XIm4JY X-Received: by 2002:a17:907:8a05:b0:6f0:12ec:d12c with SMTP id sc5-20020a1709078a0500b006f012ecd12cmr3321536ejc.646.1650618925396; Fri, 22 Apr 2022 02:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650618925; cv=none; d=google.com; s=arc-20160816; b=t/bv8qxKsOpXqaeYXXMNk0dN+uEwWuTiwNSPCK21U2QK0rEjNkpsoftdWlyQtMtQEf dEGa1YTlLUMPA9ILvZ9CSclMx/3G4BTdqKS/S5yUfSatD7Q6gMuHwmfoxYo4nh6Aknxu aQ5IbZ5SEBUUo2/DVFRSVi+O7T6yRwNPxnDPvzbZtTbEcMhZlfUHoFE/XRwKOeyaqVvb JdwqfNk4QNvaNmBWiPVrhEpD2XnKK0Vb3DhuHE+X10967FosIG1xN2Cs3ONScBXhT2lh r4YhzSXhGEonxFXmSHs4jBfGHLSqZyGTamywZ9C/HnHbtQrfpQgnjpZb3cWiTTlXFt6f jh5A== 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=fMaCBytO83QWeBHX+M0TDukA4cZ2qZ//y2bPgepwq64=; b=Tk8vID/qudmlJTN8mIhghDpQUZQTn99wAjB3EEUKUt9GAaoEgNMpqgZ47bQjkVgURV zg4aD6vJuRYxEPRaKGJuTh+rquCeFme26rm9fMZoxicJdw3j05bLl35nfE7/+zvecrBO Qg7XjQkGwBEeEmtv/1nY2FMai+iUVacsQn0Vr7QSVBzRW3NkQ/JoxVQlZHbb3rNnxNjt pZpW5Wgd6CjYrRlDNk3uQrNBNSgXoS2REjXez6iR486UOjyfw7uYrnkvhjIZqIMYafoT ofLkUuN4e78mdEjoziWaR6ooLmxytpKfPJ5i6iqF+6z2H/bMykXIvU24DMTztJm7HOKI bOZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fryKipwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a1709060ef100b006ef920a3c1csi5968272eji.624.2022.04.22.02.15.01; Fri, 22 Apr 2022 02:15:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fryKipwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444393AbiDVGaq (ORCPT + 99 others); Fri, 22 Apr 2022 02:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239131AbiDVGan (ORCPT ); Fri, 22 Apr 2022 02:30:43 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 600E850B17 for ; Thu, 21 Apr 2022 23:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650608871; x=1682144871; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=7FKlaBGgHn2LiVjGfAUlft1h9xE8gkk5PntmcCX/1as=; b=fryKipwJMtAt66EEM6DT8sLSBNIuNWcgIvfrjMg6VYC3gGx2gsgJdsPs baHLQyXG7nPQdunqwE8oW/OzL74DAcr61+/GgkL29iH/ddx2cM9ObFndJ 1Z2Khpdf9xJzUsWysKpd/z+PtrUO5K7hsgDVnDp1qYsCiRDasSEueCFd1 xM5t5H++G+cqCU64ojggYHTrxFk5Ks15oPiepWXWT7jWlGjAMhISC9U33 rAOzab40cFMC9/nPV8MQBvZGM5S0UjcHpayOuQTuHsP4NRM86NPPAykU1 d/yVNIiw5nUjoNdFKOgV4zZJ2zW2yVlYYG6UAQuX/1GzBuFueKRKAcouo Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="264757411" X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="264757411" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 23:27:51 -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 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham 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: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