Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1269791imm; Wed, 17 Oct 2018 16:54:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60B0pJ5sarh6H//Y74SDgZWsobVJq9lKr/QPU6fEyWzSTciHpYqPUW7fjjQ7jo0WONYEAm1 X-Received: by 2002:a62:c502:: with SMTP id j2-v6mr29058713pfg.194.1539820485624; Wed, 17 Oct 2018 16:54:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539820485; cv=none; d=google.com; s=arc-20160816; b=UyflYZv929iKwTWW1nbLlBT6+kkC0AKAo460osiUacT0JhRMIFuFs4Ucwjnj9w43cv GEuOp/94v1enVsyl2E09eJMd+/zJwuqS5IPrO7h+iN0+KfC9927AVfrBH+GTe/yVsWC3 A/NYKBPPhySHs942njy5QgwGvRSZKq5r6FmNtM90yfq3hQ/+b1/sDw/Vz2cIwFHhwWw+ +1vcbBexUHHTVexo3aY2+tKL656w5IKgv9g5GkeQGLnaBGWesBYR7K/OqZX2PWy4ZX10 BOoWiAFfaWlw0EnQHsT4FzH6AXph80Pm56/k/Y7YM8WO0WP9BG5GNvBH7foDnSBeSwsU dHRw== 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=CUqmKmIkECvQCNoayz3ndd9Jc55vXzeTy97m68+5aUY=; b=h/JhpjJGZEg7mlQC3uA/Cehj4hnJWNfiYr8ONB2bNEb4EfV2PNC4zuEgpyMvp3qnQN Am1avvb9CagtM18Lquh2/HmJ8zGlAmLXom/dwfnmieTN0AREcExCC1IyQezEyM3RWNnf LyuWx4A5vAsKwYcZT55BU7/Jhf3t8YDs4nX9G5A9Hv89t9k4zOud2zxuRGv0nDLNwlLH IhMIOe0mxcTtU/nOV2HrnpZKiHSy+dRzlvFDSlOGWwNe6uQlE7NAIFzAnIEMbzJmiXoB TDgjMDdQqjWJd8vHwPmQYdJ143fGreP1kedC9jKXgQeF+tFYcsC8XcGyEheBr0c+SUwI zsWQ== 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 20-v6si18753590pfk.287.2018.10.17.16.54.30; Wed, 17 Oct 2018 16:54:45 -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 S1727262AbeJRHwL (ORCPT + 99 others); Thu, 18 Oct 2018 03:52:11 -0400 Received: from mga07.intel.com ([134.134.136.100]:54892 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbeJRHwL (ORCPT ); Thu, 18 Oct 2018 03:52:11 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2018 16:54:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,393,1534834800"; d="scan'208";a="100366532" Received: from ahduyck-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.7.198.154]) by orsmga001.jf.intel.com with ESMTP; 17 Oct 2018 16:54:02 -0700 Subject: [mm PATCH v4 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: Wed, 17 Oct 2018 16:54:02 -0700 Message-ID: <20181017235043.17213.92459.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 on an x86_64 system with 384GB of RAM and 3TB of persistent memory per node I have seen the following. In the case of regular memory initialization the deferred init time was decreased from 3.75s to 1.06s on average. For the persistent memory the initialization time dropped from 24.17s to 19.12s on average. This amounts to a 253% improvement for the deferred memory initialization performance, and a 26% improvement in the persistent memory initialization performance. I have called out the improvement observed with each patch. v1->v2: Fixed build issue on PowerPC due to page struct size being 56 Added new patch that removed __SetPageReserved call for hotplug v2->v3: Rebased on latest linux-next Removed patch that had removed __SetPageReserved call from init Added patch that folded __SetPageReserved into set_page_links Tweaked __init_pageblock to use start_pfn to get section_nr instead of pfn v3->v4: Updated patch description and comments for mm_zero_struct_page patch Replaced "default" with "case 64" Removed #ifndef mm_zero_struct_page Fixed typo in comment that ommited "_from" in kerneldoc for iterator Added Reviewed-by for patches reviewed by Pavel Added Acked-by from Michal Hocko Added deferred init times for patches that affect init performance Swapped patches 5 & 6, pulled some code/comments from 4 into 5 Did this as reserved bit wasn't used in deferred memory init --- 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: Move hot-plug specific memory init into separate functions and optimize mm: Add reserved flag setting to set_page_links 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 | 50 +++ mm/memblock.c | 63 ++++ mm/page_alloc.c | 569 +++++++++++++++++++++-------------- 5 files changed, 513 insertions(+), 257 deletions(-) --