Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14460263pxu; Tue, 5 Jan 2021 02:03:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJn+AYcfEbhJKDhT32SDxrDuNZbmzIpc3dSLSn/G7miv+hMAUGSGZeFWzduHQmWSnMjfNw X-Received: by 2002:a50:abc6:: with SMTP id u64mr46913730edc.21.1609841011501; Tue, 05 Jan 2021 02:03:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609841011; cv=none; d=google.com; s=arc-20160816; b=jxVQGBxKSDcJ95GNtcNvh5/38mkY6O6YPl/GTWk3zJ2csciTGCmiHfUjNoAH3/VKsh ekYt6eN68s27X66Tt9zPcEEgIw0lWF/MsOh5f3R/a5mRRv4zEVogcr6q9rSh/Jc5ZODs DtZJCrAH0kjCjXfYxwG42iaQhQtTxzllIxotj3X9+6STdHHM1h2RUI4r6+Lpl1VrMk29 sx9Iysl3xecLyJ+1H6bg9lktYLg6QNRprKyQW+K94oi/dv6NM6YFt6qkrBMy9a+nNNpS BM4NMlFBxQyOF54PF2VxwFGVjYqPU8l6BxZbuktUOsUe/IpiuZFQ7orsZ9Xi51GcbpdQ i3OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=2jEtueBz8ZOvS21YvDXkoHLYxQlQJlmCqkVMoZHehj0=; b=q2utrfOcJE/sb9AcG8vUp13Zuze4DqH+Oyu0YSjr5I6KspkI0LTKzUXysRpED+zmno Mq2XT3JTJIRfA8DpxbozdeE9XqyMd5R4nrPIEUMNHbhXwOV3hwGITUGFtItO/uRgfI/S c5Aro8yro6yaMHVjorNXlqb6b7kqhFvCPJEZEBgVkneQa4PvaGolqvVItozpQykL08rV gokfiTQje/WzR7ujeCMgYtF7qT1P6k0huMc07zjwS2rVZQk+Dh7nyB4t/mNY7Gyokz/W u+g7ALzOv4cssXO3dRnIhjz024rQv9BKqLzhdD9gB2Jlsn1hJG1bog24xsTGHRW7ERmC jozw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KuUkVBHI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si34694617eds.359.2021.01.05.02.03.08; Tue, 05 Jan 2021 02:03:31 -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=@redhat.com header.s=mimecast20190719 header.b=KuUkVBHI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727871AbhAEKAS (ORCPT + 99 others); Tue, 5 Jan 2021 05:00:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59666 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbhAEKAS (ORCPT ); Tue, 5 Jan 2021 05:00:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609840731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2jEtueBz8ZOvS21YvDXkoHLYxQlQJlmCqkVMoZHehj0=; b=KuUkVBHISS+POQ5/+rUP1N4ryxGI9s4wqL3JMSLsSxJbgLc0QmlzqcaqRcwshOtwdCCLiA +wUb5G9sK+3wPgz2Uf5KjDGaX6umeYEVXQZZ3Wf70QHhM2dZ3RpK4Pv3VeYrauQVs8pVUa WSKZueLQoHqXE6ltjHardapZV8Ys/jg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-571-nLM0Vp2RMpScV7p3f5W1rA-1; Tue, 05 Jan 2021 04:58:49 -0500 X-MC-Unique: nLM0Vp2RMpScV7p3f5W1rA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7DA00800D55; Tue, 5 Jan 2021 09:58:48 +0000 (UTC) Received: from [10.36.114.117] (ovpn-114-117.ams2.redhat.com [10.36.114.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3AFF60BE5; Tue, 5 Jan 2021 09:58:47 +0000 (UTC) Subject: Re: uninitialized pmem struct pages To: Dan Williams Cc: Michal Hocko , Linux MM , LKML References: <20210104100323.GC13207@dhcp22.suse.cz> <033e1cd6-9762-5de6-3e88-47d3038fda7f@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 5 Jan 2021 10:58:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.01.21 10:56, Dan Williams wrote: > 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 > Yeah, I recall. That's why I favor simple approaches right now - less brain power to waste ;) > 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. Sure! -- Thanks, David / dhildenb