From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F5E5C433DB for ; Tue, 5 Jan 2021 09:56:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AD06D20739 for ; Tue, 5 Jan 2021 09:56:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD06D20739 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3DC328D007A; Tue, 5 Jan 2021 04:56:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 38C4D8D006E; Tue, 5 Jan 2021 04:56:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2A28B8D007A; Tue, 5 Jan 2021 04:56:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 13E8D8D006E for ; Tue, 5 Jan 2021 04:56:37 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D662D180AD806 for ; Tue, 5 Jan 2021 09:56:36 +0000 (UTC) X-FDA: 77671266792.21.gun63_2f13578274d8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id AAF81180442C3 for ; Tue, 5 Jan 2021 09:56:36 +0000 (UTC) X-HE-Tag: gun63_2f13578274d8 X-Filterd-Recvd-Size: 4447 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Jan 2021 09:56:35 +0000 (UTC) Received: by mail-ej1-f51.google.com with SMTP id ga15so8320163ejb.4 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=h0S3x9t2V+RGk2CDni7eLYS7ir+XBhir2Q2I97f/xq2aNKR6uvhXmbjwunUj9wH9Ns bNRYg7TEidn/02EaqtLkxPXqDGxrGQ1CUUujXHskrsNmNFZG7Xv2uwcLEYusaXIgv/WC 5+4gn/Euf7uHGIeN6SCh7aVOOn1E88E54GkiHu7fU6GQVg/23buBrkn7oO36htXXyeIf NWK0xjtNqUU36FWbCuFTIcVWdnoIDauAvV+c4J8wOlmvdGmDOgZzoFczQUZDfhJTJelw 0lfkn4p8CUXW9AoNWGsetG+7Tk2za7aoKOU3DLJqiB7LOiE5mKAbtTA093b2cbMrNbut weHA== X-Gm-Message-State: AOAM5303ZfQUnyXsrQFXAO6PRW2DjHGonYrs+cSGrZgcD+6xO64KdihJ ztKriy3C6lq9HrI1kEV06huFwihDg7O4f7b++P5QwA== X-Google-Smtp-Source: ABdhPJx3T7oCFvaCFTsIh3wLFkrXm4bB5+s0iVNYifNCqlR8z6OYgyLaQRObOPhEkkEw48QDxYukc0EeCozjt4evdg0= 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" 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: 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.