Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5562478imm; Wed, 12 Sep 2018 07:49:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY7zlcDidYfCq0GLHDQih4zxMyIHuTGS33EoORfbgOoUHPpa5S6yOKIMslQnqdqL3X+FNZT X-Received: by 2002:a17:902:bf46:: with SMTP id u6-v6mr2688698pls.85.1536763787450; Wed, 12 Sep 2018 07:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536763787; cv=none; d=google.com; s=arc-20160816; b=hwouWQfg3VlGg/vc4TukiptEsgC9U4YZBDdpBxwYf6kn+6aVWsI7gbqFpQ1wWcO3yg rvnyd2lvI89stNGJGgC3/w13xp5k7rpy087ltbn/tp2cO81qEqUwlX1wyq3v//kZ8fcZ aBeKzDnEKoWwXgxeyWHP+MbPsPqwIvWbnBDz8PS+feyTt6SOuwGD2u1AU5TnMB7eex1m 1o/ux54yTk3tkQQOxFharGHLYu+7MDKGLB/W0xqv+EUb45+RgAkHa8jXhERGXhREoq2u 5y6mzOAnxluTbiRV4xchJjvGcIW/COvBxkgJXdxdHWd28epgzn2NO9bp7rSPwg14GCF2 3KRA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=YyR9uM0oo0QzcqQCTSGpk1bUh7snJwEjrzVg8A5vW1c=; b=A4b26bu2nxTTGvOza5qgTAANknY8nG2vbw7CsiPIqoGQDZduZubBtmM3iYUufF57ts ZyO552N43+PN741fa0Ff5ylWHqag7tfNIO6VQbIXqMa6A1HTYZ8hgtcP1kgNWbJUGoVU PlulHDYsY0tYkYjWLY6KD1m2hgFiKhIRYOQHpGoi1loZYcALZ9ZUaeWkixtbLhdYo5GF l37gizLxUpd4lWURfYKbRKCYMtd/QYC7arfM5XWSDuTkACc4cCMvZNjMTvTYBXZcxJkp oNvkq2S2//t+q5i8Ia7amwnvzcQh1e8m7QtVdS1xPUBVW54FxrEZHxA49raoISRphe3J YWsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=stfBKjXJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6-v6si1195652pfy.140.2018.09.12.07.49.30; Wed, 12 Sep 2018 07:49:47 -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=@gmail.com header.s=20161025 header.b=stfBKjXJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728009AbeILTyK (ORCPT + 99 others); Wed, 12 Sep 2018 15:54:10 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:43398 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbeILTyK (ORCPT ); Wed, 12 Sep 2018 15:54:10 -0400 Received: by mail-io1-f68.google.com with SMTP id y10-v6so376241ioa.10 for ; Wed, 12 Sep 2018 07:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YyR9uM0oo0QzcqQCTSGpk1bUh7snJwEjrzVg8A5vW1c=; b=stfBKjXJMt+JsW6jtuRmOwrwemXtktO2KXfA6zm7eHpnTcar/TY3Bof3SHt87V5Xt6 RtuakD98BkD/c4uPlupvyOoL81B+HnDRIi8qJIXRC9Ca507ttLa9hrwE/Bh6u3mBKoql 29jLLJiDsK9tQq/IhDxBAEaBZfYSrqzUN7czfpgkGf5RCbPZ7Vt11Nn2ByJ1LlmESHNH LEnkXQAJeauAR0VIfWumeJLFdm8esrPJc2mvWkY2QE6W4gQeq2WgQPka3Fs3Jk6Ojevw ObC4ugVZZxNf8JYE+So2jjFmE154PNzF6tTovuGiW8S6+WEhFx0xu9/jyoTvD+E9PO4F WwEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YyR9uM0oo0QzcqQCTSGpk1bUh7snJwEjrzVg8A5vW1c=; b=ct9p5BngQi6JJl1zvA0xL4OJTJAYiWeg4Y8sXABar7RrlqnXZ2oKkmqqBcsq+paRHA G8QZw1k66jxQDCnIlRUVKKnOQ2500escyt9WCh3HjhMpfgwHuvDRt6v8yACenDo8X7us kwMuMIbftuCI/laiPejNnLxmTg+0NwEtCsQ2QyPUvdH2iZQ5ydLsuv1YrjbGMV924qhS wYkEY357Xfse5eW1pux78db1ciD09FLdeJpRA7wZ3WpDjO3f40/MNrWSE93vcX34fW6t 9r5FCxDdL4zGnJQy09W87f5CdJWq4iSxtGJUoKwzO0F3ovZGCZ1dwqOKuslgKURZdzQ7 WTJw== X-Gm-Message-State: APzg51AhJDE0M1xrTSx3KjTUh8nRwINgMcOWIhpYqBYONiT/52yH+QXu KQLHrri3JmtZqGs/np0p2yM7fO5xCx7IXo/J1N4= X-Received: by 2002:a5e:dd41:: with SMTP id u1-v6mr1980050iop.200.1536763758887; Wed, 12 Sep 2018 07:49:18 -0700 (PDT) MIME-Version: 1.0 References: <20180910232615.4068.29155.stgit@localhost.localdomain> <20180910234341.4068.26882.stgit@localhost.localdomain> <20180912141053.GL10951@dhcp22.suse.cz> In-Reply-To: <20180912141053.GL10951@dhcp22.suse.cz> From: Alexander Duyck Date: Wed, 12 Sep 2018 07:49:06 -0700 Message-ID: Subject: Re: [PATCH 1/4] mm: Provide kernel parameter to allow disabling page init poisoning To: mhocko@kernel.org Cc: linux-mm , LKML , linux-nvdimm@lists.01.org, pavel.tatashin@microsoft.com, dave.jiang@intel.com, Ingo Molnar , Dave Hansen , jglisse@redhat.com, Andrew Morton , logang@deltatee.com, dan.j.williams@intel.com, "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 Wed, Sep 12, 2018 at 7:10 AM Michal Hocko wrote: > > On Mon 10-09-18 16:43:41, 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. > > I am still not convinced that this all is worth the additional code. It > is much better than a new config option for sure. If we really want this > though then I suggest that the parameter handler should note the > disabled state (when CONFIG_DEBUG_VM is on) to the kernel log. I would > also make it explicit who might want to do that in the parameter > description. Anything specific in terms of the kernel log message we are looking for? I'll probably just go with "Page struct poisoning disabled by kernel command line option 'page_init_poison'" or something along those lines. > > + page_init_poison= [KNL] Boot-time parameter changing the > > + state of poisoning of page structures during early > > + boot. Used to verify page metadata is not accessed > > + prior to initialization. Available with > > + CONFIG_DEBUG_VM=y. > > + off: turn off poisoning > > + on: turn on poisoning (default) > > + > > what about the following wording or something along those lines > > Boot-time parameter to control struct page poisoning which is a > debugging feature to catch unitialized struct page access. This option > is available only for CONFIG_DEBUG_VM=y and it affects boot time > (especially on large systems). If there are no poisoning bugs reported > on the particular system and workload it should be safe to disable it to > speed up the boot time. That works for me. I will update it for the next release. Thanks. - Alex