Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4531180imm; Tue, 11 Sep 2018 13:24:52 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0Qpep16vIIPLEaa7+0gxjAK9VH7PrgUR60UKQ+/bLDut0xYRtaEu+Wgr1ZkHdgd6ueJbI X-Received: by 2002:a17:902:24e1:: with SMTP id l30-v6mr29084354plg.315.1536697492542; Tue, 11 Sep 2018 13:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536697492; cv=none; d=google.com; s=arc-20160816; b=WpkhHyjJiaVhJCkcplESjreZg/VJiJC3kAEupYSBmYN+5xAbSs25C3ZbRgFED+eDPy xNliiv2kKbNLShykkYGAW2MHERBmuYZymUQtv+Mq64gSDKqAr9CZpMJDToAKiBSiEMBU f2S3A9dEJE+FjSUtayhcf0LvkEqaXHF6yOVLM5N0VdWdmypmlkNM4CyZC+aYXbPUcEYZ SGuv43UyJXYiCYpbZwrjH4nCE7v/+x6eNbmXCnhumX9mc0GlUSmVZ0lbTktzM5JyRsKU q6TeJQd/lGfTomq3oB0DQx0L4kNB15Y6v//RzBSEhLf5gsjztbdxFD4urlm5i8tUCIpP VbJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=vD0nD+HVjz2E0kSTNivs0qFVb5RwWM6144DPgBaKT3o=; b=fmwOzDJCo6FWgtvGOKpsBcTE1GsNlJfT2R0qdlqPsaiukU/qvIXx0kV5Bl7moi58sv gWJGw6O3TZ/Rk6N1evakORir/fH+ihlEPPtuXloajauyxkCUGytK6+iRQw+7DxffhOwf V1HEvxYA4sBV3Yo7FN89mUFyqYH43r6HFDO2x1Y5p7trU9hMyChCm+1pfNXo8FyLehYY kFycWRSDjfnefxKoUvZw6+4nzRfSMJ47iya2CMkQyy1PEyH1g13qxWMmGRDWwhQl1tP3 0gw2DQBZKQhNSfe/Vl5ITd3sObs5RSBslK6dwPdYX8oKDNHa2Hwy5OvwJw3ukpRygoGY sFwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="jhS/HtgN"; 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 d3-v6si21815429pgk.610.2018.09.11.13.24.36; Tue, 11 Sep 2018 13:24:52 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="jhS/HtgN"; 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 S1726919AbeILBZ1 (ORCPT + 99 others); Tue, 11 Sep 2018 21:25:27 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:41201 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726762AbeILBZ1 (ORCPT ); Tue, 11 Sep 2018 21:25:27 -0400 Received: by mail-oi0-f66.google.com with SMTP id k12-v6so49786814oiw.8 for ; Tue, 11 Sep 2018 13:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vD0nD+HVjz2E0kSTNivs0qFVb5RwWM6144DPgBaKT3o=; b=jhS/HtgNQSGIyeq2ITSNkw/fCtE2EwxYw3cGsGCJBKN5mVC18Qge4P9l7zF0PeELSl gt/l7bhz2haatx7Nnf872PIZpiMJfPxZuDwoRv5VvOW0AkgA+QTdUmFQ5dM40t6CeZ8w ixxPvTWw0Ht5Bp7SACIY6dFBgBZuEMnaoIbk5voIEeKBcD57NODVEKjDAWCGW07y2SDB 7fgTRXO8z+GsCARn5r/SqHWr53i8UevS02/gmBpR5+YzsZ5gLF3a2MAzcGtVD9t7s2YT x9xEJsB3jTbVR/l4cKxlYgbfEcPYRoYazRYDRKQzhzVtBiSQxpAFKC2gA0Xs2yxLfwlx cCtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vD0nD+HVjz2E0kSTNivs0qFVb5RwWM6144DPgBaKT3o=; b=noZggeJlyP40XA6N12M4eFifAPHChm5ql709qEyvjEezzFI+RrY4C45wT0ezQUsoq9 UFrPDU2XBdIj5PWo0xxI7GhqkM80g2A9xXcS30KuMeqnVu5X72xmbMz0T+XJOTsJEIZu GZ1AAOROfiRbjX8fRbEQb+QcCcgYL4p8D4crld2z0iEJP/wYq563GeSTM1Oc+bTL8fTS 4Y9ei45fxLiB26t2oEnj1z5iLN4Ing+X9i9K/sJvaFqC76Xoui6Mo8Oj2uDFTIr29PMP RshIcRao/dqtsa38RrjpTwb5N79LsBxCJcMW1AoWRpE3LBhGiGQLO3d9E4r/k4e39ZWs 7nCw== X-Gm-Message-State: APzg51AFVloAhJCV2//58xzmnSCOHAouEnQIS3zv9ybgANUta9WNWLSp g47Z2Vpr6APPS8wZhkv9mbPF8NqF38ptHmDr819pvw== X-Received: by 2002:aca:4914:: with SMTP id w20-v6mr31122838oia.5.1536697469581; Tue, 11 Sep 2018 13:24:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:8e85:0:0:0:0:0 with HTTP; Tue, 11 Sep 2018 13:24:29 -0700 (PDT) In-Reply-To: References: <20180910232615.4068.29155.stgit@localhost.localdomain> <20180910234341.4068.26882.stgit@localhost.localdomain> From: Dan Williams Date: Tue, 11 Sep 2018 13:24:29 -0700 Message-ID: Subject: Re: [PATCH 1/4] mm: Provide kernel parameter to allow disabling page init poisoning To: Alexander Duyck Cc: linux-mm , LKML , linux-nvdimm , pavel.tatashin@microsoft.com, Michal Hocko , Dave Jiang , Ingo Molnar , Dave Hansen , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Andrew Morton , Logan Gunthorpe , "Kirill A. Shutemov" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 11, 2018 at 1:01 PM, Alexander Duyck wrote: > On Tue, Sep 11, 2018 at 9:50 AM Dan Williams wrote: >> >> On Mon, Sep 10, 2018 at 4:43 PM, Alexander Duyck >> wrote: >> > From: Alexander Duyck >> > >> > On systems with a large amount of memory it can take a significant amount >> > of time to initialize all of the page structs with the PAGE_POISON_PATTERN >> > value. I have seen it take over 2 minutes to initialize a system with >> > over 12GB of RAM. >> > >> > In order to work around the issue I had to disable CONFIG_DEBUG_VM and then >> > the boot time returned to something much more reasonable as the >> > arch_add_memory call completed in milliseconds versus seconds. However in >> > doing that I had to disable all of the other VM debugging on the system. >> > >> > In order to work around a kernel that might have CONFIG_DEBUG_VM enabled on >> > a system that has a large amount of memory I have added a new kernel >> > parameter named "page_init_poison" that can be set to "off" in order to >> > disable it. >> >> In anticipation of potentially more DEBUG_VM options wanting runtime >> control I'd propose creating a new "vm_debug=" option for this modeled >> after "slub_debug=" along with a CONFIG_DEBUG_VM_ON to turn on all >> options. >> >> That way there is more differentiation for debug cases like this that >> have significant performance impact when enabled. >> >> CONFIG_DEBUG_VM leaves optional debug capabilities disabled by default >> unless CONFIG_DEBUG_VM_ON is also set. > > Based on earlier discussions I would assume that CONFIG_DEBUG_VM would > imply CONFIG_DEBUG_VM_ON anyway since we don't want most of these > disabled by default. > > In my mind we should be looking at a selective "vm_debug_disable=" > instead of something that would be turning on features. Sorry, I missed those earlier discussions, so I won't push too hard if this has been hashed before. My proposal for opt-in is the fact that at least one known distribution kernel, Fedora, is shipping with CONFIG_DEBUG_VM=y. They also ship with CONFIG_SLUB, but not SLUB_DEBUG_ON. If we are going to picemeal enable some debug options to be runtime controlled I think we should go further to start clarifying the cheap vs the expensive checks and making the expensive checks opt-in in the same spirit of SLUB_DEBUG.