From patchwork Thu Sep 20 22:24:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 10608797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52D8915A6 for ; Thu, 20 Sep 2018 22:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43E6E2DEE6 for ; Thu, 20 Sep 2018 22:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37E052DF06; Thu, 20 Sep 2018 22:24:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE2792DEE6 for ; Thu, 20 Sep 2018 22:24:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 358B18E0002; Thu, 20 Sep 2018 18:24:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 307BE8E0001; Thu, 20 Sep 2018 18:24:23 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F7308E0002; Thu, 20 Sep 2018 18:24:23 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by kanga.kvack.org (Postfix) with ESMTP id D19F78E0001 for ; Thu, 20 Sep 2018 18:24:22 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id r130-v6so4689268pgr.13 for ; Thu, 20 Sep 2018 15:24:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:from :to:cc:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=5NTcSGtnZCZykqfFwaQt6K8rEpkFbdebFUH9So+z6lA=; b=g5u8Gl6J65zmPanZpnrrWtnCO850cK5K2rLMV5IInKBICyXOTI2EfSW3hh+ncs3DIg +tbc3cFl2h8SQZwkKXzf7yfN2SW0fqfop6poEg+RKsWGOzFjjJq0ka8o5JNbJ8Dx/kqY zi4a4YWe0FiHnMUyt90SDXKEl9N3s1fnBNEUamNcHo0YfZsYnUxeDsTv8zqQ3aBBkcsy eFv+sfilFq5AwvDqbO25l4p3uv/dSQ0Krwy6RLC6zpzQaVwuJQQrz16EU0QzL1YlK067 66p4BfvNy4l5LxmyJjmUspccrARN82xtCS8w3aFA8yV2eiRptv0dU6fqzmXWjPrlcDyZ AbGg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=alexander.h.duyck@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: APzg51C3IMslZ7aDHMocrozyTeNhxqlrNV9lSAF1X2vgtW+IPqSabU5w 8eKozju7FnHxyFRKsOv7f5BZh4tG0gxmTQ1Xi2JH2vb3ouz7vpU8bBjHEj+ZpvpPHUgZxrhLr1l oyf9AH9yJIKN87XD97rtYOeyb9Xn21BcZrYjRhfCxyLWxDR6la3mYKp/LkE+0c1TkYQ== X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr43394406pfe.162.1537482262449; Thu, 20 Sep 2018 15:24:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZHaDKmbv92S6xA3aHd891OuxtUWcT5VWVcf3p6wX0WfWzjh6rq3D4vtEJ/Raj3djBtwK4d X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr43394357pfe.162.1537482261240; Thu, 20 Sep 2018 15:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537482261; cv=none; d=google.com; s=arc-20160816; b=LHVa5bM+8UMC/pzh9JajnyaFQjCGLyJebFhV0UbJke13ZnoA7ChQ4N4tyqzdXEkjHL 8LLhR7C450IvSfEgDAd+GrBLHVgT2fHP8+Nj0Mu/HmyVdfWIXhF6zWntekxzPm7t8rNf i1j6iMH1EFcAx8BjbkZ1qktKn6xp0uYPz7GScHMTk2qWX0rPk+CpleqXKlzvIDpAydsL 59kBZRJYBynvkoCR57kjsfDlHK7VVKRRNQXW48zvvZ5WxbRrPvoTAKTlyUcUQYEYm/6j w88gP8V+/gzsbWemzSxQvxkes7EIMeiZhcoROdDZ1+QvwA9sQHL/+hCE8t8GoE59CXUl SJwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:message-id:date :cc:to:from:subject; bh=5NTcSGtnZCZykqfFwaQt6K8rEpkFbdebFUH9So+z6lA=; b=eulW14IdoCTFffocjsV3/v8mYVWVvj7FvfKPUuAj8S/XRM9ZfNhi9ois/IeUZt4Xup DNgkwXuX0dCWZCdDyxkmTZQZGY2lp5wTihnRCSlZEGeutPep7tgvlRAL+H+VD7uEHG9u lLOxnpqxtuDOu2kpLpApeUz4btUdcRwnSk3WiQk5uutCz43ahXplp57IRXkWOnBgsuGr 1LNLG8nt+FLkpl4/1EOZEWVCJKZZN28iFLrVfkUrCV5THnxz3jF2OStzEVACSdJ29whU 4E/fBULZT9hAZC9LKmyi1jvTwBgY68Eo8WqTvvO9zuWdaXC8hNTahYnYAoFAWhs/yFsj SZTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=alexander.h.duyck@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga07.intel.com (mga07.intel.com. [134.134.136.100]) by mx.google.com with ESMTPS id b23-v6si24995048pgj.571.2018.09.20.15.24.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 15:24:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.100 as permitted sender) client-ip=134.134.136.100; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=alexander.h.duyck@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2018 15:24:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,282,1534834800"; d="scan'208";a="85285084" Received: from ahduyck-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.7.198.152]) by orsmga003.jf.intel.com with ESMTP; 20 Sep 2018 15:24:10 -0700 Subject: [PATCH v4 0/5] 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: Thu, 20 Sep 2018 15:24:09 -0700 Message-ID: <20180920215824.19464.8884.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP This patch set is meant to be a v4 to my earlier patch set "Address issues slowing memory init"[1], and a follow-up to my earlier patch set "Address issues slowing persistent memory initialization"[2]. Excluding any gains seen from using the vm_debug option to disable page init poisoning I see a total reduction in file-system init time of about two and a half minutes, or 65%, for a system initializing btrfs on a 12TB block of persistent memory split evenly over 4 NUMA nodes. Since the last patch set I have reworked the first patch to provide a more generic disable implementation that can be extended in the future. I tweaked the commit message for the second patch slightly to reflect why we might want to use a non-atomic __set_bit versus the atomic set_bit. I have modified the third patch to make it so that it can merge onto either the linux git tree or the linux-next git tree. The patch set that Dan Williams has outstanding may end up conflicting with this patch depending on the merge order. If his are merged first I believe the code I changed in mm/hmm.c could be dropped entirely. The fourth patch has been split into two and focused more on the async scheduling portion of the nvdimm code. The result is much cleaner than the original approach in that instead of having two threads running we are now getting the thread running where we wanted it to be. The last change for all patches is that I have updated my email address to alexander.h.duyck@linux.intel.com to reflect the fact that I have changed teams within Intel. I will be trying to use that for correspondence going forward instead of my gmail account. [1]: https://lkml.org/lkml/2018/9/5/924 [2]: https://lkml.org/lkml/2018/9/11/10 [3]: https://lkml.org/lkml/2018/9/13/104 --- Alexander Duyck (5): 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 async: Add support for queueing on specific node nvdimm: Schedule device registration on node local to the device Documentation/admin-guide/kernel-parameters.txt | 12 +++ drivers/nvdimm/bus.c | 19 ++++ include/linux/async.h | 20 ++++- include/linux/mm.h | 2 include/linux/page-flags.h | 9 ++ kernel/async.c | 36 ++++++-- kernel/memremap.c | 24 ++--- mm/debug.c | 46 ++++++++++ mm/hmm.c | 12 ++- mm/memblock.c | 5 - mm/page_alloc.c | 101 ++++++++++++++++++++++- mm/sparse.c | 4 - 12 files changed, 243 insertions(+), 47 deletions(-) --