Received: by 10.223.176.5 with SMTP id f5csp4059451wra; Tue, 30 Jan 2018 01:16:41 -0800 (PST) X-Google-Smtp-Source: AH8x224E13VB3mh29AKXAEz9vrnbyVJO5YtPjAGVoM/l52mzRP8VM8i7GrQunlodOPAmraOWm5Bn X-Received: by 2002:a17:902:4906:: with SMTP id u6-v6mr18748560pld.92.1517303801269; Tue, 30 Jan 2018 01:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517303801; cv=none; d=google.com; s=arc-20160816; b=MJ7oobnCugw26+AtpzrHrY2vSnvs9o9JdVUTjOhHNmmLMDwabZE9q+p0mDzIHHFT5+ bNFs6QBdsYsldbBXRbU6/WhzfVQEaFz/LDme07LBmQ7IP5gbR1BBsACDQRfjzLX9PJ/Z 8H/A/jMDkaoESAiRSHBJKRGuCfL23BSs6YPVF0UDYbKhiNaX98CwrsmjAl/eTFn5HvlG I9UdEnfD0Jkwv4RXGb1MI9t0ww7t4+GJOxX0qNYzAI8/45L6wnj8+LIuSHu0p4urr45I e1waimrm8PTLiIIVCAFB/XqASf1oGYPdzZxuNJfs76bn1N78lsvcm9L/uiafmw295ewN JEvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=1FllLt0lFwM4NapaQlIyD8zUjsSsxCCCQh1l1Q6zPu4=; b=or/t+cc5b1AyxzJd/LwfkzqkMFfcAmFCj1Vnm1XyTUr7yMr0SBZPOZzBMgDy1VqhTh xX6Z5lG4ct5k10dsXCV2BCXTF4LMK35GC4mSvahaLPlUQmFKoQ3oG1qbh0wNoYnnZShs N+gmrSK9zHV4XAS8i27U0YxolvFx1u3LjMJyT2soHR5r65v6nUZ2QmHysxNIBnNnvJN5 80F7ZGqoZltYGaFIlxi7UMiyaTBVtoQzrDyjmRRnYyXJpJiMqXfoaoUmYT1xJxRZrCW/ UuQiNlkA2yLr4eWeEbOJ7b1sl2FCJP9DsUYigcj1rqod1cE6pxJ1Q/UG4jSaSY+09gKE +s0w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23-v6si2372127pls.382.2018.01.30.01.16.26; Tue, 30 Jan 2018 01:16:41 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751448AbeA3JQE (ORCPT + 99 others); Tue, 30 Jan 2018 04:16:04 -0500 Received: from mx2.suse.de ([195.135.220.15]:34147 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750959AbeA3JQC (ORCPT ); Tue, 30 Jan 2018 04:16:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3A64AAD14; Tue, 30 Jan 2018 09:16:01 +0000 (UTC) Date: Tue, 30 Jan 2018 10:16:00 +0100 From: Michal Hocko To: Bharata B Rao Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, pasha.tatashin@oracle.com Subject: Re: Memory hotplug not increasing the total RAM Message-ID: <20180130091600.GA26445@dhcp22.suse.cz> References: <20180130083006.GB1245@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180130083006.GB1245@in.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 30-01-18 14:00:06, Bharata B Rao wrote: > Hi, > > With the latest upstream, I see that memory hotplug is not working > as expected. The hotplugged memory isn't seen to increase the total > RAM pages. This has been observed with both x86 and Power guests. > > 1. Memory hotplug code intially marks pages as PageReserved via > __add_section(). > 2. Later the struct page gets cleared in __init_single_page(). > 3. Next online_pages_range() increments totalram_pages only when > PageReserved is set. You are right. I have completely forgot about this late struct page initialization during onlining. memory hotplug really doesn't want zeroying. Let me think about a fix. -- Michal Hocko SUSE Labs