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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DECE7C10F13 for ; Tue, 16 Apr 2019 15:33:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACAD920872 for ; Tue, 16 Apr 2019 15:33:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="D0VK6UGY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729904AbfDPPd6 (ORCPT ); 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_=--