Received: by 10.223.164.202 with SMTP id h10csp270594wrb; Tue, 14 Nov 2017 15:07:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMbcZvzw3VBtTKVxfRlBVjzo8x+U2jNn60/xin2ZZ8wAYCkFZ40YS/kW33Vb2zp/HHMiTAJZ X-Received: by 10.84.211.79 with SMTP id b73mr13652063pli.116.1510700873764; Tue, 14 Nov 2017 15:07:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510700873; cv=none; d=google.com; s=arc-20160816; b=xTyQhZzhHrIS+hpZWPrg42/IO1QNcNAHD0mvmSIkYLg4PuiryXc/3mB8eNwZ0NKNY9 pYBiLzc05fUOiNArF6U3nyTjbuMGChaVatU6sx8bTpXqylw1uBfnpZXqByMWIPm33SQa seVH60mFvgpz4TCNc7g/GTSNvEfSVMhZ2enFvycvvXcyrXQIS4WwYNbc5ghUAYPrsUfE 6EzY/QYb7phWkT71GlqSvKLiWakg9ho9yPyZ6k1FSjFGqPB1ME0vmTlTEUlJilwcmjie SYrq83v2dadpPV5k45URnG9iOsIVSZB3K1KEgvH30mYfkIsWoA9E3kDOz26Vs5UQ7N4I xaug== 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:dkim-signature:arc-authentication-results; bh=EHbyfhzrJEZR75BE203X2hkbFfKJEuSro8SJ//ndBao=; b=Oh+6xHiU5K7VT8lMMyZiO8LMBX7N+1xCstGOTFTkW5kzB/j1Q/KQ0Q8yLYZg9C0fd/ bbedi02Oc8ysQxuz19EXJpkmsVb3J4G8gI+FXrWJwcyNnExLH0tlFWjYeyPAEGfBYB2a DpZ/sm4M/AkyY7JJd725wfMMCTPzd4rkKQ/dKu1Yl8tNZ8SSt14ExPQEbqvvP5FZRJk/ /4NtHGgQOyW2BSwIlgOo1WTyIFrgNNxppuOfpMG7F0zs9BU5glwbC9djLAUOF+3ozh7u 4yy/zNEMtltnQTIO9hxwBvhb/JjeP/738bY5BJFNw8ANtYgpyJ0ZUr/60JfQw35aobHO 1LHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=fozTiLtO; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e92si16899086pld.705.2017.11.14.15.07.41; Tue, 14 Nov 2017 15:07:53 -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; dkim=fail header.i=@cmpxchg.org header.s=x header.b=fozTiLtO; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756819AbdKNVHt (ORCPT + 87 others); Tue, 14 Nov 2017 16:07:49 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:48792 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755697AbdKNVHn (ORCPT ); Tue, 14 Nov 2017 16:07:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EHbyfhzrJEZR75BE203X2hkbFfKJEuSro8SJ//ndBao=; b=fozTiLtOXG0EMqy7vx5UcRVX+5 D1nFrUDI0viH8OiCoO4a2XCXLSw/T2hEbJ2rx6rNiHNGbq4S8tPDY/k6TJEy22mCKyjlD6SXCubEy t5XVtuwuRxhfJSpuScKzGd5mD84dZoB1pjpCMYEEBqeoDglgfzWIV4DP93u6xfamjas8=; Date: Tue, 14 Nov 2017 16:07:07 -0500 From: Johannes Weiner To: Roman Gushchin Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Mike Kravetz , "Aneesh Kumar K.V" , Andrea Arcangeli , Dave Hansen , kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: show total hugetlb memory consumption in /proc/meminfo Message-ID: <20171114210707.GA31184@cmpxchg.org> References: <20171114125026.7055-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114125026.7055-1-guro@fb.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 14, 2017 at 12:50:26PM +0000, Roman Gushchin wrote: > Currently we display some hugepage statistics (total, free, etc) > in /proc/meminfo, but only for default hugepage size (e.g. 2Mb). > > If hugepages of different sizes are used (like 2Mb and 1Gb on x86-64), > /proc/meminfo output can be confusing, as non-default sized hugepages > are not reflected at all, and there are no signs that they are > existing and consuming system memory. > > To solve this problem, let's display the total amount of memory, > consumed by hugetlb pages of all sized (both free and used). > Let's call it "Hugetlb", and display size in kB to match generic > /proc/meminfo style. > > For example, (1024 2Mb pages and 2 1Gb pages are pre-allocated): > $ cat /proc/meminfo > MemTotal: 8168984 kB > MemFree: 3789276 kB > <...> > CmaFree: 0 kB > HugePages_Total: 1024 > HugePages_Free: 1024 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > Hugetlb: 4194304 kB > DirectMap4k: 32632 kB > DirectMap2M: 4161536 kB > DirectMap1G: 6291456 kB > > Signed-off-by: Roman Gushchin > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Johannes Weiner > Cc: Mike Kravetz > Cc: "Aneesh Kumar K.V" > Cc: Andrea Arcangeli > Cc: Dave Hansen > Cc: kernel-team@fb.com > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org Acked-by: Johannes Weiner From 1584082335066147812@xxx Tue Nov 14 22:30:38 +0000 2017 X-GM-THRID: 1584047644957198570 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread