Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3227787imu; Sat, 24 Nov 2018 00:34:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/VEasqLC7mTn3Wi+FhVYshvR6bucXNi0RGH2A/FE3J2XlCQPhAWDoJpaL9qNbEoKow/CB4c X-Received: by 2002:a62:5950:: with SMTP id n77mr5103873pfb.128.1543048469677; Sat, 24 Nov 2018 00:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543048469; cv=none; d=google.com; s=arc-20160816; b=wAU8BqUIZ8UJZM0EUew+KIcxe61Lvs9QorUqkq1vKrTBp7r/pyvrDU31ZlVxi6pwCP YyTUgFP0EWhDbef5QnRDM0rXbmDBqvmWjM5lhRLakUcG9Dwm1NLeXfqjBndx2xUi6wBu CuZPoI3dxa5eYdnKL7fIDYdjqbw+upP+HUYCvbReNQ3xF+9yzWfi+Rl1EC3lwuw5ZU64 P/kBhJDGojA5nLbCS2L55Sq6+NGpBK/myAENEW/AaFlAC2qZApVIABAnWqEgIhkjqaqQ 6KcCkfU9PpsoyRoXCPs0Yti/F/5HjhKtiPLiqRHGjxFEw3Zzv8sCYOyyN+OgSgATpMXF FkCA== 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; bh=gWoJEhdlSXNwPF/IHjMc6v1DssGmWW9IV4zcULJVPRU=; b=bjBe8g6GP7UbjPUP7LYMft3SlW43yatQGpyE5eq9mZHjB3QAzl3clIqRH6jcsL9Wsd AgzQlRFzFVIU1b7htyaR66BSCUSzPGCJb76zy2ZLgqknXLnUR1jIGT5clb2CSnQ5c2dj UMBCe6tShfhhb7XH1AudHZAknmhl8jpfKXmVKkib4qnBx0uECgRuFrdSI4TkHqvO2mWD mrm7F6oOADrJyhRBWtpDisUMnLvITv6Kz14JoBSKzHjZDNz0vg4kmK150lrakU22eMCq FDqImr5mmBmNp4hpxorgffuTPTaRbY8qZQmhXU3s1M7/gDXK+Q9PXmFsA3bjYdeWtKN9 Rm6w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33-v6si57169882pld.433.2018.11.24.00.34.15; Sat, 24 Nov 2018 00:34:29 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504457AbeKWX4u (ORCPT + 99 others); Fri, 23 Nov 2018 18:56:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:41492 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390867AbeKWX4t (ORCPT ); Fri, 23 Nov 2018 18:56:49 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0F23DAF3F; Fri, 23 Nov 2018 13:12:40 +0000 (UTC) Date: Fri, 23 Nov 2018 14:12:37 +0100 From: Michal Hocko To: David Hildenbrand Cc: Oscar Salvador , linux-mm@kvack.org, rppt@linux.vnet.ibm.com, akpm@linux-foundation.org, arunks@codeaurora.org, bhe@redhat.com, dan.j.williams@intel.com, Pavel.Tatashin@microsoft.com, Jonathan.Cameron@huawei.com, jglisse@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/4] mm, memory_hotplug: allocate memmap from hotadded memory Message-ID: <20181123131237.GO8625@dhcp22.suse.cz> References: <20181116101222.16581-1-osalvador@suse.com> <2571308d-0460-e8b9-ad40-75d6b13b2d09@redhat.com> <20181123115519.2dnzscmmgv63fdub@d104.suse.de> <20181123124228.GI8625@dhcp22.suse.cz> <4fd2e8fe-a85d-af96-ee04-8ddfd1fbe79d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4fd2e8fe-a85d-af96-ee04-8ddfd1fbe79d@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 23-11-18 13:51:57, David Hildenbrand wrote: > On 23.11.18 13:42, Michal Hocko wrote: > > On Fri 23-11-18 12:55:41, Oscar Salvador wrote: [...] > >> It is not memory that the system can use. > > > > same as bootmem ;) > > Fair enough, just saying that it represents a change :) > > (but people also already complained if their VM has XGB but they don't > see actual XGB as total memory e.g. due to the crash kernel size) I can imagine. I have seen many "where's my memory dude" questions... We have so many unaccounted usages that it is simply impossible to see the full picture of where the memory is consumed. The current implementation would account memmaps in unreclaimable slabs but you still do not know how much was spent for it... > >> I also guess that if there is a strong opinion on this, we could create > >> a counter, something like NR_VMEMMAP_PAGES, and show it under /proc/meminfo. > > > > Do we really have to? Isn't the number quite obvious from the size of > > the hotpluged memory? > > At least the size of vmmaps cannot reliably calculated from "MemTotal" . > But maybe based on something else. (there, it is indeed obvious) Everybody knows the struct page size obviously :p and the rest is a simple exercise. But more seriously, I see what you are saying. We do not have a good counter now and the patch doesn't improve that. But I guess this is a separate discussion. -- Michal Hocko SUSE Labs