Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14459179pxu; Tue, 5 Jan 2021 02:01:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMyHdETyd67Q4CoB6P5JvIZFMtOjqjY8rEvwtp9zVh/jgUJyFqqsQYMiesShDag2utgK0l X-Received: by 2002:a17:906:5f92:: with SMTP id a18mr72194454eju.126.1609840900257; Tue, 05 Jan 2021 02:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609840900; cv=none; d=google.com; s=arc-20160816; b=RJTHWMPI2anlqsKYj5nowsmsjQ42gadzKUrxDOTAz279pWAG0mIMeAs1GyHXzp8RII IT67M1mx8ZG0WLMprVzUwMWvpcpnkM3VsJ21poYSfeFRLvjX7/i6JQG5DqBEs6uiAjaR ovG6ML9u6s8ubOXRpSPfJ6nrds9XT/9pJu93j03n4QsN+fRiYUxcKu2Y2THc5B6JkcWM TZjO3gN2wGSNpmgYYope+AfhFQ85w7mK0bQ1Wk4957llBYqrQ2nT+Bkg0yPLlGGsYMxc IbBViiu+02+fg13LKYfb1SKnulstPjQDoK885/IquvTavudrrkb9YH3X56h0A5Ej3c6e vECQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5A1eUdVV8jBV9FEHfLRhVvTQqvHBMIsWDnMOxR+ewyE=; b=lCJ8IAp/yjmh3xw4x7fQPGH6VUGmfzYhIWXwrN+O+H85hr4pieaga54SFFr+9PayPW oVv4XLBRDsnWctI3bAlDZp5VQnlFwr63mXw9k7OLTl30lX1K1U0TDS/KtK10/6z0Fsly R/lECOgUtk6K1OIka3KenJ6JOpp1hZtaep2cFkjrsniBaWCPhJejrt/MhcjYN11onONJ H4YnMiiwYHzTH5LBmwQ8fDvILPE/Bw8B0AuBBtkaPfPZM3h6jhmHjQ6UzTohb7NjMkc6 bYvRLHyC3zevkaNjNWk8gvgv7Qs2H0SlaQ10wKJHVowRdKfF2pi3ng3WGCC9a1fj1CES iXJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=U61CdFz6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u13si32432174ejn.694.2021.01.05.02.01.16; Tue, 05 Jan 2021 02:01:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=U61CdFz6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728074AbhAEJ5Q (ORCPT + 99 others); Tue, 5 Jan 2021 04:57:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbhAEJ5Q (ORCPT ); Tue, 5 Jan 2021 04:57:16 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0DCDC061574 for ; Tue, 5 Jan 2021 01:56:35 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id g20so40504783ejb.1 for ; Tue, 05 Jan 2021 01:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5A1eUdVV8jBV9FEHfLRhVvTQqvHBMIsWDnMOxR+ewyE=; b=U61CdFz6T+oAkKvSQ9QI5MXmNVYjzQi0wTyqHIllBuU/CxsweaJWmgoPPRK+gaIN0d 6/gEdEEze+t0/ZCSjn4OYQDJ0Yao759E+CrgTQkZoMD2MPwd1UDSp9D3yS5Sxd4BA6rh PW+nBYAR2EI0vq6q81zwDR1qHbsXNLAJ2XtUHXiqm6b+Iy14v0xK8RH53ksf8IC5jtk2 ZQH2CN4tw1UshBS6Fj+LqOn3AeydMmjJk+IoyEVVRuxXEiebrBI3mMeFNWtt8A3eGKjX jm4v4qT+Bq1k6i7XOL1EVuExk5njF0b2DXNKikljHEcqr20oGrBaCDfjuxysaDb1Ju+G A2CQ== 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=5A1eUdVV8jBV9FEHfLRhVvTQqvHBMIsWDnMOxR+ewyE=; b=EPzxVT5LYxZ/qYo0tqRBUXb5m3+TsuAoSuJESP9cZLNcyanP0WeNlc9v6L3VH8o1sN bmtr6prCcBbVBW+hkV0FyjyA53Fe10C5cgtcRYswHhu9XFuNvJg7wTpbWuDsDdXjdATm FG3ZXTLsS1tXvYsSqluwSf5OIzvmXsvUGsTgEHwlamkjvGWR9DsvXJEG3/TMfTVLk2Sq INK2d5V8em1KoylDlBkBAKs8SGYooyDjhdT5D0y/IRvxlJKuKj/QLan27fDQ81mZrNB2 GyI4+Ae+CCxRY2RQpnh76PR7Yd9JPAKGt1glsXCTTPZaRu8c0U1azCkROg5SHRj7eWJn V7KA== X-Gm-Message-State: AOAM531D+1kIBruB0ezOU+bQEZvNE7C4B1X/HaDcf9J0V3A6XxGn3U2a T76D/tH864f3ja91A8knroJ2v4FTjlrmZXgj84BQrA== X-Received: by 2002:a17:906:a29a:: with SMTP id i26mr69092588ejz.45.1609840594391; Tue, 05 Jan 2021 01:56:34 -0800 (PST) MIME-Version: 1.0 References: <20210104100323.GC13207@dhcp22.suse.cz> <033e1cd6-9762-5de6-3e88-47d3038fda7f@redhat.com> In-Reply-To: From: Dan Williams Date: Tue, 5 Jan 2021 01:56:22 -0800 Message-ID: Subject: Re: uninitialized pmem struct pages To: David Hildenbrand Cc: Michal Hocko , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 5, 2021 at 1:37 AM David Hildenbrand wrote: > > >> Yeah, obviously the first one. Being able to add+use PMEM is more > >> important than using each and every last MB of main memory. > >> > >> I wonder if we can just stop adding any system RAM like > >> > >> [ Memory Section ] > >> [ RAM ] [ Hole ] > >> > >> When there could be the possibility that the hole might actually be > >> PMEM. (e.g., with CONFIG_ZONE_DEVICE and it being the last section in a > >> sequence of sections, not just a tiny hole) > > > > I like the simplicity of it... I worry that the capacity loss > > regression is easy to notice by looking at the output of free(1) from > > one kernel to the next and someone screams. > > Well, you can always make it configurable and then simply fail to add > PMEM later if impossible (trying to sub-section hot-add into early > section). It's in the hands of the sysadmin then ("max out system ram" > vs. "support any PMEM device that could eventually be there at > runtime"). Distros would go for the second. > > I agree that it's not optimal, but sometimes simplicity has to win. Here's where we left it last time, open to pfn_to_online_page hacks... https://lore.kernel.org/linux-mm/CAPcyv4ivq=EPUePXiX2ErcVyF7+dV9Yv215Oue7X_Y2X_Jfw8Q@mail.gmail.com I don't think a slow-path flag in the mem-section is too onerous, but I'll withhold judgement until I have the patch I'm thinking of in-hand. Let me give it a shot, you can always nack the final result.