Received: by 2002:a4a:3008:0:0:0:0:0 with SMTP id q8-v6csp3545784oof; Mon, 10 Sep 2018 16:44:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbSKhyGK75lWjbaOXFubxAerQ/pm/hpAMOL8OHyZVnc65Oeh0s4LvCjQHDvJtzutYPGbQox X-Received: by 2002:a63:f849:: with SMTP id v9-v6mr25188808pgj.71.1536623053144; Mon, 10 Sep 2018 16:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536623053; cv=none; d=google.com; s=arc-20160816; b=NXJs8encPb02+e8b56FJQb2rirRvvm6syalU1gk2JtpFS51/q0tuDGGM/kHNVLcflI WTMbCEJAKhUozpH6MoZMDPfi4l3XJthBPPEPci4LrbC4HrDCC+bSgQ47WO7GJzgHGnfr Lb136bUBW+mj2P72sJtWnE1kukb6aJizAYS2EIkgi2N6dG38mXlNcxL48LY3sSPqbiBO lVGrFx7d4ICtT4k+dG5HkB5SGyugH6F4GVIL3m4oxot6nG/M3napLoDEkgvePrbAU+J9 FpRNLHzO1Cbk4qbo6Q50gv4OUDkA/pF591NcF9sUOXVFwxiPKBIn43adAjzU8F9Yl+MY urOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=Yw9vxWJ6YGklpxQJwQlNRm6osFUbXs3EZVyomclg/uU=; b=B0cW8TsaR3/xj5yI6vc722Q3W75pbSllEAH1RFj3310C6N1X7oTUNm7GNX+YJS5oDI 3nG7V4OjO1B5gpgVsBIpL5s/pZwQrsG6r2paCpNaPHXRXDcI+ZD1TTd2eylhaTgzY6F6 RCzHeSUYZNBC5p5V7jIhbgbgVFP1/F4pIoDV+xr0fIjHIQXiLMa69DIXGAevNS2OXp6B niMQjH4ZDGgOCUKA503hR/n6/NwDvV872mFjGgARHzX4Uls5fwyBybEX63/mi1hp9kaq D6mBLEsyTNvQi/DlIW0+AXGsFlId0hIhl6K1FxT1YpqqVfmdfptKbJPfsEpc4oRts9D7 xoSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bcjDolYs; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p65-v6si19190488pga.401.2018.09.10.16.43.44; Mon, 10 Sep 2018 16:44:13 -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=@gmail.com header.s=20161025 header.b=bcjDolYs; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726325AbeIKEkD (ORCPT + 99 others); Tue, 11 Sep 2018 00:40:03 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:43701 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbeIKEkC (ORCPT ); Tue, 11 Sep 2018 00:40:02 -0400 Received: by mail-pg1-f193.google.com with SMTP id v66-v6so11238023pgb.10 for ; Mon, 10 Sep 2018 16:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=Yw9vxWJ6YGklpxQJwQlNRm6osFUbXs3EZVyomclg/uU=; b=bcjDolYst6bXqjaW2RF8VHS4mSuZOYlLSSbZ6BmoiNT0YAd2yOI5U3yIwRYQA+ds82 uYAX3p/rJJTc3cM1WNxmUAIGs378sHp/YuIBRuQKfhv6+jSga3YCYPcHBX8jX1GWkJYX DkHdoSOk1DIV4T8Xx9WGiGb8LqEmVXpld9UbgbhfgAgOd+j5u5eo9+j0I1PHPoZP190C 1+tCDBUsj73eqWH6dUM18zs5q+BaIDG5jmZd28uH8dJi30iCMr28MMUuxTsIlukpdfId VNfGa11mwN3fGGZ/W6LcU4slqG+ywFzP2FgE98tU81ta3isMFZi86114mNnIUuIDggK1 vArQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=Yw9vxWJ6YGklpxQJwQlNRm6osFUbXs3EZVyomclg/uU=; b=PdGk5AcYuuHjUED3PjWUU3QmIBGppMOqsgcQz7f21X+4iC6sFscnLRcMdykLaZCh9p 2xNYf3+lystFdZeYY9Bh9pGjzcsMjUN/S5/dTKADTpL7PzKV0+zZVeCAPVI3od0tDaZ6 6SjBDrDU47MV1qQFeMZiGZnwVYPaaBD1CQbfmnZN6s62hpPPV/CHd8yJPyyEfB6Ug2Ho GcZ9vEg2VCf9gAJOY1m4N+ietaKjSV/f5zaJzWFAQKGRZNsr8ruEO0WICjqfDdEvhpIl 6f9e7lEd/LU3mFDgXxmVd/+K3EdJAJIMlIYHrTVUqsTqqrSCRvRreZt01Ke31Ln6+Jqr oMtg== X-Gm-Message-State: APzg51BAvsFGR1ym7fT1ew1+S/aIT04PsKAetwjXJ9QAhYqrnqMpVKtD Kt/qa1jCntU2+cMm+jAdfFQexXcX X-Received: by 2002:a63:d90b:: with SMTP id r11-v6mr25397961pgg.315.1536623016848; Mon, 10 Sep 2018 16:43:36 -0700 (PDT) Received: from localhost.localdomain (static-50-53-21-37.bvtn.or.frontiernet.net. [50.53.21.37]) by smtp.gmail.com with ESMTPSA id 16-v6sm27924027pfo.164.2018.09.10.16.43.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 16:43:36 -0700 (PDT) Subject: [PATCH 0/4] Address issues slowing persistent memory initialization From: Alexander Duyck To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Cc: pavel.tatashin@microsoft.com, mhocko@suse.com, dave.jiang@intel.com, mingo@kernel.org, dave.hansen@intel.com, jglisse@redhat.com, akpm@linux-foundation.org, logang@deltatee.com, dan.j.williams@intel.com, kirill.shutemov@linux.intel.com Date: Mon, 10 Sep 2018 16:43:35 -0700 Message-ID: <20180910232615.4068.29155.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set is meant to be a v3 to my earlier patch set "Address issues slowing memory init"[1]. However I have added 2 additional patches to address issues seen in which NVDIMM memory was slow to initialize especially on systems with multiple NUMA nodes. Since v2 of the patch set I have replaced the config option to work around the page init poisoning with a kernel parameter. I also updated one comment based on input from Michal. The third patch in this set is new and is meant to address the need to defer some page initialization to outside of the hot-plug lock. It is loosely based on the original patch set by Dan Williams to perform asynchronous page init for ZONE_DEVICE pages[2]. However, it is based more around the deferred page init model where memory init is deferred to a fixed point, which in this case is to just outside of the hot-plug lock. The fourth patch allows nvdimm init to be more node specific where possible. I basically just copy/pasted the approach used in pci_call_probe to allow for us to get the initialization code on the node as close to the memory as possible. Doing so allows us to save considerably on init time. [1]: https://lkml.org/lkml/2018/9/5/924 [2]: https://lkml.org/lkml/2018/7/16/828 --- Alexander Duyck (4): mm: Provide kernel parameter to allow disabling page init poisoning mm: Create non-atomic version of SetPageReserved for init use mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap nvdimm: Trigger the device probe on a cpu local to the device Documentation/admin-guide/kernel-parameters.txt | 8 ++ drivers/nvdimm/bus.c | 45 ++++++++++ include/linux/mm.h | 2 include/linux/page-flags.h | 9 ++ kernel/memremap.c | 24 ++--- mm/debug.c | 16 +++ mm/hmm.c | 12 ++- mm/memblock.c | 5 - mm/page_alloc.c | 106 ++++++++++++++++++++++- mm/sparse.c | 4 - 10 files changed, 200 insertions(+), 31 deletions(-) --