Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3300237yba; Tue, 16 Apr 2019 08:35:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJv/Qhk6wumdDk2nzYdBCeJKDvBV62pabyT6U4mAbrX6vVa0vQDmPvxXpsLu+vvgySFE1E X-Received: by 2002:a63:c302:: with SMTP id c2mr78219807pgd.235.1555428929700; Tue, 16 Apr 2019 08:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555428929; cv=none; d=google.com; s=arc-20160816; b=WvyUyYUuW+Wx2nwPSWkDeJ3YLD2+rHPUGgvo1ZwFSU8T9AQch1fTMX88DfF2nlwYfh mK/rHCzDoWOdzYUx89MZakiBuwO7ZxkYv4zhRtgvra1NXnQhkCrhdKW92l6j8T0cO5Ur wIg3ACNBlX2Khry8mO7A08klGNEg2vbxRa73zyev1/E+i6gnIjCz5Fw8hpLuUMp79qbm gEeNePO8KuihCCyxpsSW3q7PTewi2p5qoJp6u+wza1+qtoqIuROk5admqzvRHgncyFtD /E581twzse7Xmu2m+uoElwYmZyrLtAmJ7FIkyrYKc09/M8T8Q9T71GbBaUUTSSgrxcM0 AdFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=bd3kFaiRh/kYQ/VA2Yue7fpxsO8GiVa2yaT3r9nUGpA=; b=SUaZCZMK5aVdEjzLunA+0d1rY/bQAGw9q4BlKXEaqsso7H9574CHSopHvyTUuo7tE+ Dv3Ifackt5iKfJTo9QTmc6bQJ18NmeI4Ici/heKl4EWufHz903W+uZTiHNzmcXKcPiQX N1RVcrWIzzBiOqd3rEKq+J/bHeCumMo9qap4lB/bM6bzAVA6yZvC9k9Y9/QLSEN86qhZ ChpdI8JMkfudmetVUjf7s98tFKA91lPJPvy75B4cNLRI3TAwtwPwBS/IgE7tkH/uVOv9 cUA2/4mT6y5szznmB48pjyEbXeKXK++RTcD1Upqev0j5yMpRp7DWlgRxwsJz7EVwJ5zo b4Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=D0VK6UGY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n22si47273006pgk.102.2019.04.16.08.35.12; Tue, 16 Apr 2019 08:35:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=D0VK6UGY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729900AbfDPPd6 (ORCPT + 99 others); Tue, 16 Apr 2019 11:33:58 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:17478 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfDPPdy (ORCPT ); Tue, 16 Apr 2019 11:33:54 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 16 Apr 2019 08:33:58 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 16 Apr 2019 08:33:53 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 16 Apr 2019 08:33:53 -0700 Received: from [10.2.163.24] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 16 Apr 2019 15:33:50 +0000 From: Zi Yan To: Dave Hansen CC: Michal Hocko , Yang Shi , , , , , , , , , , , Subject: Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node Date: Tue, 16 Apr 2019 11:33:48 -0400 X-Mailer: MailMate (1.12.4r5622) Message-ID: <960F3918-7D2C-463C-A911-9B62CD7E5D83@nvidia.com> In-Reply-To: References: <1554955019-29472-1-git-send-email-yang.shi@linux.alibaba.com> <20190412084702.GD13373@dhcp22.suse.cz> <20190416074714.GD11561@dhcp22.suse.cz> MIME-Version: 1.0 X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL108.nvidia.com (172.18.146.13) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: multipart/signed; boundary="=_MailMate_57E8BCAB-6C56-41AF-B3EE-B97124E8B1E5_="; micalg=pgp-sha1; protocol="application/pgp-signature" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1555428838; bh=bd3kFaiRh/kYQ/VA2Yue7fpxsO8GiVa2yaT3r9nUGpA=; h=X-PGP-Universal:From:To:CC:Subject:Date:X-Mailer:Message-ID: In-Reply-To:References:MIME-Version:X-Originating-IP: X-ClientProxiedBy:Content-Type; b=D0VK6UGYELnYUHygSl0eyMobF7vDjJmVInGEQAE2b5AzTNcYNwrcir9jTW721dQLC KlUSOECLHZwckWMmSvAxeGJShPtqiUdvY3C+934PK2093dwETWwTj2HdblVYf7r4b9 9+Byh4SNduynLz6VwrONfBRZjT+A1eiiEG9UhWGoVhVE5vavKnhbf+7sMcrOVrzKoA Fxj1nlC0vLEQa9ZBE1kpwF/B1OPnJVl0MLhCtVAy4tkUuntOP9oBsYMh2NKC3F8j2h xtlyM7eQ/HXU+a4kdgkS+puU8YmaHZScYRL8Xs4PSVa/ChVR8wpdSzHYKyneUGf/KD sml2IjdsrCIaQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=_MailMate_57E8BCAB-6C56-41AF-B3EE-B97124E8B1E5_= Content-Type: text/plain On 16 Apr 2019, at 10:30, Dave Hansen wrote: > On 4/16/19 12:47 AM, Michal Hocko wrote: >> You definitely have to follow policy. You cannot demote to a node which >> is outside of the cpuset/mempolicy because you are breaking contract >> expected by the userspace. That implies doing a rmap walk. > > What *is* the contract with userspace, anyway? :) > > Obviously, the preferred policy doesn't have any strict contract. > > The strict binding has a bit more of a contract, but it doesn't prevent > swapping. Strict binding also doesn't keep another app from moving the > memory. > > We have a reasonable argument that demotion is better than swapping. > So, we could say that even if a VMA has a strict NUMA policy, demoting > pages mapped there pages still beats swapping them or tossing the page > cache. It's doing them a favor to demote them. I just wonder whether page migration is always better than swapping, since SSD write throughput keeps improving but page migration throughput is still low. For example, my machine has a SSD with 2GB/s writing throughput but the throughput of 4KB page migration is less than 1GB/s, why do we want to use page migration for demotion instead of swapping? -- Best Regards, Yan Zi --=_MailMate_57E8BCAB-6C56-41AF-B3EE-B97124E8B1E5_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBAgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAly19dwPHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKA9gQAKI3aZgoIkLFQzrv57dHqxIAVc6GgDJWTE+Z mryinojumKMAcHTp9ZkvGszdgq+Cgt7NKecFtL1pVzue6/Gy9da8zzigfXw7el+T lfAWXZiV7WcRXBFhjvvYrngfJiZmlx/mFjt7euWS4dBGDiDj3Xn/Zaj0h6S+DcNS SqAKuhk1xIQPPXFnnkZTbSY92bHL02txpYYSd2R9rRyyTam2hPKqzyFueCZhoFlv zcKnaLZ0nmx/GJL9MJiIxXc5Upcbypa+y1VP3OZkh9sbcUcRAKcP/2AISMz9+TsJ IDnDyWsV6pO1hpAayFk9pVSuu+wZdJ2wf1anA0d+S4KygqLkq9fynRvUqP2Ch4A2 kM48I4UaeS/c4l8lACoBAoa68edg2h+2Z+x33RM1gtfNNZivo6ZbWfNgg2MObeBZ IaDhwPFV2rBlM6Ol5KLMt4a/Xz0uA0aEj3cZ4udB3q6bQqtbxEvkDL7ydQ1CbcG4 LaoEdonPBTsYwbvNE5g6Ly1b5LjGtdHLL1fSnF5JfIVPYl4d0EIa14qITDqc+j+Y C4JYyMbDfxzUvLtXT3B8CC2UyMEp66DKrk3Jd9doVaetfi6clonUuKzymLU2nc9M DU4L+APcbW2Wt6Cud+GgRoNfm2sK7YYRu+eul2YFHLfw9Ecz/uQoNK15SIsJqUcg WFrORWyW =yfKR -----END PGP SIGNATURE----- --=_MailMate_57E8BCAB-6C56-41AF-B3EE-B97124E8B1E5_=--