Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp55125imm; Thu, 11 Oct 2018 15:19:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV60T6hG3WqLJTLRKYvMpe5GFadmZi4OLsw64CGKAdTGIOpFsT5PESGx0bEg+Tv+//97phmy3 X-Received: by 2002:a63:d208:: with SMTP id a8-v6mr2797432pgg.99.1539296342927; Thu, 11 Oct 2018 15:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539296342; cv=none; d=google.com; s=arc-20160816; b=ux5aLioyOQjCU/48WRMqlSjDKpNDtIlvd9vJFLQcSBbxUKRRn8+ERMqLReoAXNp2WF HSncL5KR8uDsv3shQWzbFBl31yUwVUkEJ5hpBe2DnMEha3hNveU5mJVwW/lenUfwPsyg G/VPggLBGDcl9F59ahdtc30GuHgC0dxAxsLAjkUdHAcVysBTvUTqZIHeFxMEtbZ9XwTf Hsia/4k3KQzsl0jQ5LA3xiAy7UbHN3ko+YB7dsd3hl1wCNMEfjeq3j4+mDfRy4fJ6MM2 2lO78Z8E5KXufE8JRladmnRrcg4bIbFzUvuFSPNg+dYcbDMBTSwLrZUHQGAdhvtvjS6x mQxg== 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; bh=pdfHqsyOIQQQ+YzjsoOaPBgG4CxT9KawRAPWq4S+gEI=; b=YFCdeda1pbSEYPPgcER5fhbnZWBIKYGEA1AIGxUiQ6Pr7QH2CpKuK7Z3RpVmLpdXaM dL2S52Y7PY5fEDjj1jnRyJMEcMAolxn6M/Wium321Xl4e/C35vGkVJO84PioGjHK9yCI ENay9OUim+HUMhXw6MPK2L6Dm4V7LgMZYYMXc7WscG9tpuInBpBDktJy7tBgVwcxtlst 2gTVyzzpdcTxvQ0DIVBto5E+D67mgL2xJOt2JOtVrPPhdPeDGLvj+85oeQ2E4lIf0yAq x+ckvKRcCOdC5pV/JYAN1mGsM7yNtVMv0IiLkWoEmT43Xx5Qqhf2Gzq3UMAQ1Yr6dyot YxBQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si21632131pgc.570.2018.10.11.15.18.47; Thu, 11 Oct 2018 15:19:02 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726862AbeJLFqM (ORCPT + 99 others); Fri, 12 Oct 2018 01:46:12 -0400 Received: from mga12.intel.com ([192.55.52.136]:35657 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbeJLFqM (ORCPT ); Fri, 12 Oct 2018 01:46:12 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 15:16:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,370,1534834800"; d="scan'208";a="80765696" Received: from ahduyck-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.7.198.157]) by orsmga008.jf.intel.com with ESMTP; 11 Oct 2018 15:13:28 -0700 Subject: [mm PATCH v2 0/6] Deferred page init improvements From: Alexander Duyck To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: pavel.tatashin@microsoft.com, mhocko@suse.com, dave.jiang@intel.com, alexander.h.duyck@linux.intel.com, linux-kernel@vger.kernel.org, willy@infradead.org, davem@davemloft.net, yi.z.zhang@linux.intel.com, khalid.aziz@oracle.com, rppt@linux.vnet.ibm.com, vbabka@suse.cz, sparclinux@vger.kernel.org, dan.j.williams@intel.com, ldufour@linux.vnet.ibm.com, mgorman@techsingularity.net, mingo@kernel.org, kirill.shutemov@linux.intel.com Date: Thu, 11 Oct 2018 15:13:28 -0700 Message-ID: <20181011221237.1925.85591.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 patchset is essentially a refactor of the page initialization logic that is meant to provide for better code reuse while providing a significant improvement in deferred page initialization performance. In my testing I have seen a 60% reduction in the time needed for deferred memory initialization on two different x86_64 based test systems I have. In addition this provides a very slight improvement for the hotplug memory initialization, although the improvement doesn't exceed 5% from what I can tell and that is to be expected since most of the changes related to hotplug init are mostly just code clean-up to allow for reuse. The biggest gains of this patchset come from not having to test each pfn multiple times to see if it is valid and if it is actually a part of the node being initialized. v1->v2: Fixed build issue on PowerPC due to page struct size being 56 Added new patch that removed __SetPageReserved call for hotplug --- Alexander Duyck (6): mm: Use mm_zero_struct_page from SPARC on all 64b architectures mm: Drop meminit_pfn_in_nid as it is redundant mm: Use memblock/zone specific iterator for handling deferred page init mm: Do not set reserved flag for hotplug memory mm: Move hot-plug specific memory init into separate functions and optimize mm: Use common iterator for deferred_init_pages and deferred_free_pages arch/sparc/include/asm/pgtable_64.h | 30 -- include/linux/memblock.h | 58 ++++ include/linux/mm.h | 34 ++ mm/memblock.c | 63 ++++ mm/page_alloc.c | 552 +++++++++++++++++++++-------------- 5 files changed, 483 insertions(+), 254 deletions(-) --