From patchwork Wed Sep 5 21:13:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 10589461 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 A875313AC for ; Wed, 5 Sep 2018 21:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9537A2A6F0 for ; Wed, 5 Sep 2018 21:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8812A2ABD3; Wed, 5 Sep 2018 21:13:26 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 31E2D2A6F0 for ; Wed, 5 Sep 2018 21:13:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 220CF6B752C; Wed, 5 Sep 2018 17:13:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1F6A96B752D; Wed, 5 Sep 2018 17:13:25 -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 10EFE6B752E; Wed, 5 Sep 2018 17:13:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by kanga.kvack.org (Postfix) with ESMTP id C9C9F6B752C for ; Wed, 5 Sep 2018 17:13:24 -0400 (EDT) Received: by mail-pl1-f200.google.com with SMTP id bg5-v6so4364219plb.20 for ; Wed, 05 Sep 2018 14:13:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:cc:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=PrM3TBGsiWAzwppBp1iAxyBHbfSoPrUIEmFqlambUSs=; b=tmIdUCCSkipMZVTwrblxJmiShy1XIzwvoVVew9AChpxU6uIaTKjLBtniygvw/5ZJk6 Ys3kl3nWKr8YXZrpZ885CVVa5i9oUiZVTY6tS9VIo32PKnaDudcJgU86JsZaGScrwdYq sGRaoV2t0D7KyV9JHAGL6JkXRw1gSjj9/Q5ZoVRfcERKLqOyd15muSRdXTs69S1APY+F kQUQQMQrJLc4Vonhnitd1GoG/8eUqI63yxkCM5u0otQeah+wFNk0it/ExXKm14z7ur/4 2UNBCYH9B89EZZ8W1JbgI6dImjdbHQ1A8+4fSLbCyRNNW1RNFRgGYd0QeTxjNf52AVm6 5kFA== X-Gm-Message-State: APzg51DHrR5HaOn4p7VuzP+sOjNrDWV1zcM4vZPSyCBMjBbdonFbsv5V f+Dp1bB2UCi2RTXWntEOqSrHk3ctaLrKm7O0JX1PJDuQS6M9kDUX1YQa826gZMEYyA2fr317kwZ TX3B50IQeLZanN/A0/fP0LFeKDooMfVQzE7uDqftKNN9B2dqwoqcb9UYbRF6uASscEq7yDp9Qf8 tE9wa57YuXsGgTnv4+QgYcXKDrP2qS56l3VwTfTZ+dIqwV6ZseMouqSrd8Xh/zmhE09bg8Z6/zk SQUumZipfKUXAjIsSUBtn4bq/AgJ/hCcFKW1zv8UJb1IeqQXdGeQVldb/TVwTSg+fBXfN/S0seu fxX2Wl9dcKz0XEMKw2vuDLO31WbArBSiXe+CTOcg04IR3yBBu6R2m9UPfz4kXT4ua27cLFlJXFr P X-Received: by 2002:a63:1f0a:: with SMTP id f10-v6mr38095261pgf.66.1536182004516; Wed, 05 Sep 2018 14:13:24 -0700 (PDT) X-Received: by 2002:a63:1f0a:: with SMTP id f10-v6mr38095212pgf.66.1536182003804; Wed, 05 Sep 2018 14:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536182003; cv=none; d=google.com; s=arc-20160816; b=QBq01z2C9EfLDW758M3hB/ElJyU4nZ81JykgzJTjCIaBIjstFk6acVWgSMCXdJxXE/ 1RyUZJO72mRQJ9q+CVLQ2qa2Uqz1GHzCJq1fm8Ryh9hEmrxiz2OazL8ZHBxNA8tSEbKX 0W2IJqcZs+TIjQSAGplvJpQS/G+dnPT22DWy+f7JLyC+QwEZazJ0aGnImIjgNgXYPkzG 3rJvNWeqxCQp5mVwoyoVe67QwXbfw0CIpdakMiBKXAF6/spU/E9Vt9Gz0jTw2GP+dFSq 6XXrjRidq4jktFxhyLdBzr8J272PLv4WaAPsnPiETnLqOKK5mLvA+p33GlH5Nl9B9mHT sxBA== 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:dkim-signature; bh=PrM3TBGsiWAzwppBp1iAxyBHbfSoPrUIEmFqlambUSs=; b=pQOdKeEhvaYaTt8JWDdJUwOxeuRvgndtTCq9k8MgpbNGyjEmMBb3lyAiKbvNGy1kKq YAD0VWFX6/rhA3Pjv0zp1BnLgW3SD/Nt2kspOWqPrinwX1dyOIfpBbudy4b+/SOPv/+1 JeXVpwCQEtpAVW7lbOVq2t5nCkYzpEMQQmeGBfCdKLtK2r6CxOxdCv1nS6Ynv7HvP40t hp6RCbqHCgwqpZws+xQ2hFGSaI7PibTeMRiYyxzd5VW3Q/yH0bN2Wq5RNCfHFA+12bk4 Sjp72xdNDl58ihYOmA9eSNx4Ul5mCDzohufjjXxsGt3AjssGsFhpHRYDPc//iDuWqXoO 90sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cR5jXW1+; spf=pass (google.com: domain of alexander.duyck@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=alexander.duyck@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d29-v6sor698505pfj.97.2018.09.05.14.13.23 for (Google Transport Security); Wed, 05 Sep 2018 14:13:23 -0700 (PDT) Received-SPF: pass (google.com: domain of alexander.duyck@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cR5jXW1+; spf=pass (google.com: domain of alexander.duyck@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=alexander.duyck@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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=PrM3TBGsiWAzwppBp1iAxyBHbfSoPrUIEmFqlambUSs=; b=cR5jXW1+/GuOQhU3LI5ukQMbdXrHw8Uaaj6+9R6LpvTWACJD24GexcV2aXJHz1kNV6 KkKtX9v4CoPaIvCpnvYffkH02u2Nsexkat0zuACasmOt/mpqZs9CPtfnY/hYPqr9xSE+ TCdI12B+KDrnpx1ZhgUnI/Vce0MTuCDBEM96zEhaR4wYhPKu1jlRFOf2bI+gbR3oVp9F K1a5Ed+Ta6K05sdyeBVKZfFKlztTvHeJ4ki2NinLQUGAd3c6saef38YHsPgOs5rrXyLK 1b6lkElDvRMPY46UtsrdILPTqbt04Cu9QJwmmCWAVmZKCjcgsbx4IzZ8k/95TtP2f3cv f8NA== X-Google-Smtp-Source: ANB0VdbZeRNP7la+1lxRJBJ3sS1G3Lkw41HOzRklrofSZt2Ez/KriXuI1oAcTZeEjvNcS5YpPvm37A== X-Received: by 2002:a62:45d2:: with SMTP id n79-v6mr42671057pfi.137.1536182003347; Wed, 05 Sep 2018 14:13:23 -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 d12-v6sm4788230pfk.69.2018.09.05.14.13.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 14:13:22 -0700 (PDT) Subject: [PATCH v2 0/2] Address issues slowing memory init From: Alexander Duyck To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: alexander.h.duyck@intel.com, pavel.tatashin@microsoft.com, mhocko@suse.com, dave.hansen@intel.com, akpm@linux-foundation.org, mingo@kernel.org, kirill.shutemov@linux.intel.com Date: Wed, 05 Sep 2018 14:13:22 -0700 Message-ID: <20180905211041.3286.19083.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 series is meant to address some issues I consider to be low-hanging fruit in regards to memory initialization optimization. With these two changes I am able to cut the hot-plug memory initialization times in my environment in half. v2: Added comments about why we are using __SetPageReserved Added new config and updated approach used for page init poisoning --- Alexander Duyck (2): mm: Move page struct poisoning to CONFIG_DEBUG_VM_PAGE_INIT_POISON mm: Create non-atomic version of SetPageReserved for init use include/linux/page-flags.h | 9 +++++++++ lib/Kconfig.debug | 14 ++++++++++++++ mm/memblock.c | 5 ++--- mm/page_alloc.c | 13 +++++++++++-- mm/sparse.c | 4 +--- 5 files changed, 37 insertions(+), 8 deletions(-) --