Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp786178imm; Tue, 15 May 2018 09:09:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq5jg2u3983pj6PRe7xOHsEORovGxT0ovyX3rKxHb/8uz9/qyn72PSvhxjI80Y7qo1sDKfS X-Received: by 2002:a65:4306:: with SMTP id j6-v6mr12778032pgq.341.1526400551689; Tue, 15 May 2018 09:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526400551; cv=none; d=google.com; s=arc-20160816; b=YXxYqNGHIYzEjkrjC2ooF1lLj0Db2MdFcPojWKFoToGorDK3U1gf2AMtBUxRrna5uw W0gJj2FfZ9o9dgYM3QMXw8tr+r4bedWEjkrWhk2/YLWkg2hWbUzVRmq1DzOR+MUbiCX9 4taCzDsbH+1+lV07/ltNdvB3YHabvGkT8t6hynUhvJzHy4chNLjALaYsHfzDMpZulp1X goHFUqcz0bwe7whHQ8HAVcyu6h2ar5k5A5K7MJcW+sCi0V91h4qGsivp5tl1PCh+wZQu POEGlXY4acNPkeNCBfTChSvbKHgohpsSat58fCJ+lVgRQvlgbqC1Rg4ik33InNm8Ema+ EAxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=JU1oWBMLcR6nM19xegeigGBopVFiDe8g9sCsQGnn3mE=; b=BStt2idAkrTKJGCY38YM6ZZqeOuBG+6p5bTn33XOag4sV7JfQ2UhLYWhIQDdZSsWyR aPU9D2B1oVMiaLuhm0G09LOyuwdfw49DAAYtVcOCGX18Ace+LvHTc2uidUUl3H0HpO5i g9kelAVMCltpgEHM9R8hWYfWmKh3L+TWHcArZSBDuJjUJTcB9MgPBuNaHEDah/xJ/B8f yzN8T1/GX6AVCXhALP8w/TzX0RQWxaRM93Y98WMHm4jc9WkNtwpUfTJfa0Q/WyPT/G7E nVR0TOyG4stPXk9BVY+jnemNGu/nh4oTI8YQKPoBYeJv400rIu3ZcBHMO6ebks3uDZNI RREw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@LenovoBeijing.onmicrosoft.com header.s=selector1-lenovo-com header.b=QZCc3aDt; 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=lenovo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n136-v6si340465pfd.312.2018.05.15.09.08.57; Tue, 15 May 2018 09:09:11 -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=@LenovoBeijing.onmicrosoft.com header.s=selector1-lenovo-com header.b=QZCc3aDt; 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=lenovo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753886AbeEOQIA (ORCPT + 99 others); Tue, 15 May 2018 12:08:00 -0400 Received: from mail1.bemta8.messagelabs.com ([216.82.243.207]:40486 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753545AbeEOQH5 (ORCPT ); Tue, 15 May 2018 12:07:57 -0400 Received: from [216.82.242.38] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-15.bemta-8.messagelabs.com id CD/16-22406-BD50BFA5; Tue, 15 May 2018 16:07:55 +0000 X-Brightmail-Tracker: H4sI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/3pNcEnKrKPGpzJBbeslvFhKBqM3j5xiiyk3IjwSQvnTZtfcbz+29acjRXJO36qyb43GmmIff 5ruKG924FKUrdPvr1hS3GTv3T4Hnm1yfPyodYTxo4zu6v11AeaY2nXdn1/KSsgFD1/dvmTSH7 AwEiiOT+XdknmfwBMmwK1LwQAAA== X-Env-Sender: yehs1@lenovo.com X-Msg-Ref: server-3.tower-128.messagelabs.com!1526400475!69576315!1 X-Originating-IP: [104.232.225.2] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.9.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 42229 invoked from network); 15 May 2018 16:07:55 -0000 Received: from unknown (HELO maesmtp01.lenovo.com) (104.232.225.2) by server-3.tower-128.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 May 2018 16:07:55 -0000 Received: from HKGWPEXCH01.lenovo.com (unknown [10.128.62.30]) by maesmtp01.lenovo.com with smtp (TLS: TLSv1/SSLv3,256bits,ECDHE-RSA-AES256-SHA) id 555a_78b3_5e490aa4_5cfd_4880_a096_0147180833d0; Tue, 15 May 2018 16:07:45 +0000 Received: from APC01-PU1-obe.outbound.protection.outlook.com (65.55.88.18) by HKGWPEXCH01.lenovo.com (10.128.62.30) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 16 May 2018 00:07:33 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=LenovoBeijing.onmicrosoft.com; s=selector1-lenovo-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JU1oWBMLcR6nM19xegeigGBopVFiDe8g9sCsQGnn3mE=; b=QZCc3aDtG/SjqEpdwlhLqKg5fiypnN/d1SgMgJqxDw/J/4vGpk56fVnDuEfy1/b7Q6nfZCzgeBpUPK12J4AAs704FASVRDmSBfw1jxhZ67yo5oeqpgMhB9qBMKTgyxr5eB/q27X+WzD+XrF/O3qLG3WhoV2lQbgaHUGliBCVF7M= Received: from HK2PR03MB1684.apcprd03.prod.outlook.com (10.165.178.14) by HK2PR03MB1729.apcprd03.prod.outlook.com (10.165.178.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.4; Tue, 15 May 2018 16:07:29 +0000 Received: from HK2PR03MB1684.apcprd03.prod.outlook.com ([fe80::bd0b:1233:5126:db12]) by HK2PR03MB1684.apcprd03.prod.outlook.com ([fe80::bd0b:1233:5126:db12%5]) with mapi id 15.20.0776.008; Tue, 15 May 2018 16:07:28 +0000 From: Huaisheng HS1 Ye To: Matthew Wilcox CC: Jeff Moyer , Dan Williams , Michal Hocko , linux-nvdimm , Tetsuo Handa , NingTing Cheng , Dave Hansen , "Linux Kernel Mailing List" , "pasha.tatashin@oracle.com" , Linux MM , "colyli@suse.de" , Johannes Weiner , Andrew Morton , Sasha Levin , "Mel Gorman" , Vlastimil Babka , "Ocean HY1 He" Subject: RE: [External] Re: [RFC PATCH v1 0/6] use mm to manage NVDIMM (pmem) zone Thread-Topic: [External] Re: [RFC PATCH v1 0/6] use mm to manage NVDIMM (pmem) zone Thread-Index: AQHT5jPWfBz2tzl9Xk+fNx5ZDx4cXqQknf8AgAADSZKAAIHYsIAABJCAgAGpooCAAlnpAIAHx6xw Date: Tue, 15 May 2018 16:07:28 +0000 Message-ID: References: <1525704627-30114-1-git-send-email-yehs1@lenovo.com> <20180507184622.GB12361@bombadil.infradead.org> <20180508030959.GB16338@bombadil.infradead.org> <20180510162742.GA30442@bombadil.infradead.org> In-Reply-To: <20180510162742.GA30442@bombadil.infradead.org> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [123.112.142.186] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HK2PR03MB1729;7:9kdps3I+QZ+EJQrKR61Jehgyj6lA+jJR7MIJ0l/8dDspd+Ilg3JmrO7Ym6d63cJYcJTs5R9wp8VvpZtYG1ySA/euF0xd5sclXLpk1Zs02UE4fuEYljPb6SefczV4EFP9ouajAdERsEh66JEnqr66qoxf6B1VE5oUI03dIlrhGm63ocFWB6j+Kpo4SmDln/yB3fZIwv+E/tRdOxVL5JcQbEioRc2zHstmHk2cPzbxTodJmih3MrBOzocloT1LrJMU;20:sApgTHLsPEB7ig7BRmNahQGIQ+ozEHP4HpFQaNshf7S0zvGWJ47HkdZxOGjJSYv07vIU1mA9UK7or/cP7695Mbh54Fu6Nk+QdcGhhZzZ8Ak3roX1mNB3bAe++B4AkgrRIvgwOy/zMoBroC6fVOQ45Ll5ZLOwRM/62gtzvgdJ6D1qAfvANJJh7dDNRWVKVCOoIAnJ4hh3mb14Ix5jclXr7E/waa9jjZbDg082z1yfZAMQS6hn/Jlkjx+rDOa5ZzmnodLa2pyu2ED9bIBjpV18iaoYcvm5SL6Hr4voi/1LMPp5jWVDjitYvy+hnkoQ5cxrDX+mst26cBGgQFR9PdrIjw== x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(39380400002)(396003)(39850400004)(366004)(376002)(346002)(189003)(199004)(68736007)(53936002)(55016002)(59450400001)(9686003)(2906002)(8676002)(102836004)(7696005)(81156014)(7416002)(97736004)(3280700002)(3660700001)(81166006)(8936002)(5250100002)(76176011)(5660300001)(6506007)(229853002)(11346002)(93886005)(446003)(486006)(2900100001)(4326008)(6916009)(476003)(66066001)(316002)(105586002)(106356001)(107886003)(561944003)(54906003)(478600001)(33656002)(86362001)(6116002)(26005)(3846002)(6436002)(25786009)(6246003)(14454004)(74316002)(7736002)(99286004)(186003)(305945005)(9126004)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:HK2PR03MB1729;H:HK2PR03MB1684.apcprd03.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:HK2PR03MB1729; x-ms-traffictypediagnostic: HK2PR03MB1729: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:HK2PR03MB1729;BCL:0;PCL:0;RULEID:;SRVR:HK2PR03MB1729; x-forefront-prvs: 0673F5BE31 Received-SPF: None (HKGWPEXCH01.lenovo.com: yehs1@lenovo.com does not designate permitted sender hosts) received-spf: None (protection.outlook.com: lenovo.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 6PdGJSV8CH5ePS3begjfJ/m4bVyJ+VX2TLSRjDqKKNkDri3caL9Rdp61h4ySM33pzwPrhyAi6nfFt7PRhRMjcgPMpVqTI3jYoY8N2GKo+jPWXNIGezPWc7+3K1UGhUJMMJnt8NlWcdcpxhbeqm5aai0e8dzLpOEcMsBKvPeOgX/Br8D2GG8erfLk9can4c2J spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 99346adf-9d87-448e-2615-08d5ba7df4ed X-MS-Exchange-CrossTenant-Network-Message-Id: 99346adf-9d87-448e-2615-08d5ba7df4ed X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2018 16:07:28.4091 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5c7d0b28-bdf8-410c-aa93-4df372b16203 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR03MB1729 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: owner-linux-mm@kvack.org [mailto:owner-linux-mm@kvack.org] On Behal= f Of Matthew > Wilcox > Sent: Friday, May 11, 2018 12:28 AM > On Wed, May 09, 2018 at 04:47:54AM +0000, Huaisheng HS1 Ye wrote: > > > On Tue, May 08, 2018 at 02:59:40AM +0000, Huaisheng HS1 Ye wrote: > > > > Currently in our mind, an ideal use scenario is that, we put all pa= ge caches to > > > > zone_nvm, without any doubt, page cache is an efficient and common = cache > > > > implement, but it has a disadvantage that all dirty data within it = would has risk > > > > to be missed by power failure or system crash. If we put all page c= aches to NVDIMMs, > > > > all dirty data will be safe. > > > > > > That's a common misconception. Some dirty data will still be in the > > > CPU caches. Are you planning on building servers which have enough > > > capacitance to allow the CPU to flush all dirty data from LLC to NV-D= IMM? > > > > > Sorry for not being clear. > > For CPU caches if there is a power failure, NVDIMM has ADR to guarantee= an interrupt > will be reported to CPU, an interrupt response function should be respons= ible to flush > all dirty data to NVDIMM. > > If there is a system crush, perhaps CPU couldn't have chance to execute= this response. > > > > It is hard to make sure everything is safe, what we can do is just to s= ave the dirty > data which is already stored to Pagecache, but not in CPU cache. > > Is this an improvement than current? >=20 > No. In the current situation, the user knows that either the entire > page was written back from the pagecache or none of it was (at least > with a journalling filesystem). With your proposal, we may have pages > splintered along cacheline boundaries, with a mix of old and new data. > This is completely unacceptable to most customers. Dear Matthew, Thanks for your great help, I really didn't consider this case. I want to make it a little bit clearer to me. So, correct me if anything wr= ong. Is that to say this mix of old and new data in one page, which only has cha= nce to happen when CPU failed to flush all dirty data from LLC to NVDIMM? But if an interrupt can be reported to CPU, and CPU successfully flush all = dirty data from cache lines to NVDIMM within interrupt response function, t= his mix of old and new data can be avoided. Current X86_64 uses N-way set associative cache, and every cache line has 6= 4 bytes. For 4096 bytes page, one page shall be splintered to 64 (4096/64) lines. Is= it right? > > > Then there's the problem of reconnecting the page cache (which is > > > pointed to by ephemeral data structures like inodes and dentries) to > > > the new inodes. > > Yes, it is not easy. >=20 > Right ... and until we have that ability, there's no point in this patch. We are focusing to realize this ability. Sincerely, Huaisheng Ye