Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4538832yba; Wed, 17 Apr 2019 13:45:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2Mo4ST2vspEgAfaBaIYN8loeiwg6wHYwBDCJgNRrkhDEAMu3YXQ7Y6V3fXl3GC80xwruk X-Received: by 2002:a63:1912:: with SMTP id z18mr85638307pgl.115.1555533904106; Wed, 17 Apr 2019 13:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555533904; cv=none; d=google.com; s=arc-20160816; b=Mg9OIuAuGorzK03dWqVpzCxWIIEURRwNtpODOFKOVDYF0BZfHd49//wKbOjWGJyFQM TY4ZRkOvWdpHK9m7n5FUrUIrTOCyBoXjaF/gF9fhX4fBspE8iQn+9qgiisKb504fPtAP bbYDGNxD/50kNivzaDxVaOdS6S50mD+Vr5bSSY+q9wAFIjxpAZyot45LD/biLJgtecUM 33OuAiAIsdeXVh1n4ffMlkU11Mr8x2eKpVA7tcoo2HsGwfrHFzDUYUpu23kSf5j13uVs QtROBfAzuKvH2TOjsOBso6nBQePkdI5dbcW84A6L1XiWuIHmRXrSrS4mlD93TTd5YyzP Mh5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=gPAoHrmOWmoZ0TaqEOJEK8z2yhB8ryvYgpIjCo9Xlu0=; b=h+BDVXDWcfSymvozwb5AZ9dMgspXMkFI0fpjno7SeqhJCg7RVoOSUGgg4glu/BQLeD VW+0U9oyuAoBoIJ9DpOtBLj2jo0ngYZZFjgBu3vyu3xS+5wtP08t4uk1fPSkxDB73eHk qKD8g90G+OSAWpIklg2TRbFvnNBY50AJ1lTRivfpWa1TIXtCnOVymN+bn+qnRT/smB86 b7rhBMjyXtVJt4lH1P81VPxdvc5MjSpe5REBUQ4hmOMogbqrFD1aLC68qzuUgmQ8qhDl NTNeivDduSwcOvbRqyai5gPhjN2s63wJiAhSw3NW59QMeZs3qvopUTGrwOdW7tHrp7xO DdYg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r190si25811497pgr.125.2019.04.17.13.44.47; Wed, 17 Apr 2019 13:45:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731382AbfDQUn5 (ORCPT + 99 others); Wed, 17 Apr 2019 16:43:57 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:40096 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbfDQUn5 (ORCPT ); Wed, 17 Apr 2019 16:43:57 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0TPaV10X_1555533824; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0TPaV10X_1555533824) by smtp.aliyun-inc.com(127.0.0.1); Thu, 18 Apr 2019 04:43:49 +0800 Subject: Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node From: Yang Shi To: Michal Hocko Cc: mgorman@techsingularity.net, riel@surriel.com, hannes@cmpxchg.org, akpm@linux-foundation.org, dave.hansen@intel.com, keith.busch@intel.com, dan.j.williams@intel.com, fengguang.wu@intel.com, fan.du@intel.com, ying.huang@intel.com, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1554955019-29472-1-git-send-email-yang.shi@linux.alibaba.com> <20190412084702.GD13373@dhcp22.suse.cz> <20190416074714.GD11561@dhcp22.suse.cz> <876768ad-a63a-99c3-59de-458403f008c4@linux.alibaba.com> Message-ID: Date: Wed, 17 Apr 2019 13:43:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <876768ad-a63a-99c3-59de-458403f008c4@linux.alibaba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> >>>> I would also not touch the numa balancing logic at this stage and >>>> rather >>>> see how the current implementation behaves. >>> I agree we would prefer start from something simpler and see how it >>> works. >>> >>> The "twice access" optimization is aimed to reduce the PMEM >>> bandwidth burden >>> since the bandwidth of PMEM is scarce resource. I did compare "twice >>> access" >>> to "no twice access", it does save a lot bandwidth for some once-off >>> access >>> pattern. For example, when running stress test with mmtest's >>> usemem-stress-numa-compact. The kernel would promote ~600,000 pages >>> with >>> "twice access" in 4 hours, but it would promote ~80,000,000 pages >>> without >>> "twice access". >> I pressume this is a result of a synthetic workload, right? Or do you >> have any numbers for a real life usecase? > > The test just uses usemem. I tried to run some more real life like usecases, the below shows the result by running mmtest's db-sysbench-mariadb-oltp-rw-medium test, which is a typical database workload, with and w/o "twice access" optimization.                              w/                  w/o promotion          32771           312250 We can see the kernel did 10x promotion w/o "twice access" optimization. I also tried kernel-devel and redis tests in mmtest, but they can't generate enough memory pressure, so I had to run usemem test to generate memory pressure. However, this brought in huge noise, particularly for the w/o "twice access" case. But, the mysql test should be able to demonstrate the improvement achieved by this optimization. And, I'm wondering whether this optimization is also suitable to general NUMA balancing or not.