Received: by 10.223.164.202 with SMTP id h10csp572460wrb; Wed, 15 Nov 2017 04:40:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMZOokU2dfToDAm4FagwJ+zi9EHtazQ4m1YpJtwXyla/+1CWEIcaTlUWfImShddSk/eE1mXK X-Received: by 10.84.128.227 with SMTP id a90mr7777364pla.224.1510749642405; Wed, 15 Nov 2017 04:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510749642; cv=none; d=google.com; s=arc-20160816; b=erpj1qjkO6KMLM7yACWcBpuCoypE02gX7mH/xt8zRJ+JfTW/3BrS1kdvztm7F/WJj3 ujyONbSqNqFM3A6iNXsJPfjuv9mh/Sv0byLgGa1FwjH/nSK2T72Cg0d3BM0iqrACMRH1 PcFoHoJcbfQR3CslX1hv5aP+DQ1tZokLkwasPuXmXJGyp9l7UUuNPqxckNLyisrWNrWm JEx0+Yv8dw9tRijsyUdLFsX3ozHx+HcWiS1Zy1X6v+e8x7BFlrUu8wDdMdmdMSVUm7IB GzNNCFUwc41mFLJhbpqobgrnRg0iLEKWizr6DW12hUQUF2rTUL7lDzyCG6jmI8rTlbHW p+8w== 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=lK8l8ZpLYLx41ye05YuPOxg7HQJuq6p/1ODCN4zbpEA=; b=KiqYKlzANWXW6MHBzZ0rjeef/+or6nAEM8Os5X4GNmMyyApu68q4GKx7eAX25qQNmi QH47t387+qltrhrhe8g+sefs23XlXPAhtIHCAjlo5EtOr2oB7/IpkS/x3IzwUTy1ceGi qQCOCV4crJ3JXd1G4CXIyTtnkE7kt3ib3SlfeLbMSN+/80ndgqsuHRS5tRXwyfUXfKaR 5+uTg1vLSQSeb1gHZwox7nJ+cgVgxWhEZrdRJoFMZdaFOgR0wYm2A85RHA3l2ifcE6Gz WDOxRtHBDMbRyRFLaq3smI+PxsjNtEgdVHkpW6+jNRtdodH8BAMw3hSqPU00BMzIUVqv RbTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=Oc7+Xc54; 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 ay2si17065912plb.380.2017.11.15.04.40.30; Wed, 15 Nov 2017 04:40:42 -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=Oc7+Xc54; 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 S932403AbdKOMPc (ORCPT + 90 others); Wed, 15 Nov 2017 07:15:32 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:48966 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbdKOMP0 (ORCPT ); Wed, 15 Nov 2017 07:15:26 -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=lK8l8ZpLYLx41ye05YuPOxg7HQJuq6p/1ODCN4zbpEA=; b=Oc7+Xc54mrqKsfZNEGlcxbUlzY aNqERTby5FSL/Q1KhoKlRQU827QOWByhY+w0s5QoAiF4JpRoo641QTdV18Ujnw3wpQQSO3KqaVdqd uFQD4o+bF58tEg+1XEHI5+bv2tedgoAFwy7g6kfYL6e1Rcn06qGmDh4Cj+bFdCAVJtnI=; Date: Wed, 15 Nov 2017 07:15:08 -0500 From: Johannes Weiner To: Roman Gushchin Cc: linux-mm@kvack.org, Michal Hocko , Vladimir Davydov , Andrew Morton , Tejun Heo , Mike Kravetz , Dave Hansen , kernel-team@fb.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] memcg: hugetlbfs basic usage accounting Message-ID: <20171115121508.GA2501@cmpxchg.org> References: <20171114172429.8916-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114172429.8916-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 05:24:29PM +0000, Roman Gushchin wrote: > This patch implements basic accounting of memory consumption > by hugetlbfs pages for cgroup v2 memory controller. > > Cgroup v2 memory controller lacks any visibility into the > hugetlbfs memory consumption. Cgroup v1 implemented a separate > hugetlbfs controller, which provided such stats, and also > provided some control abilities. Although porting of the > hugetlbfs controller to cgroup v2 is arguable a good idea and > is outside of scope of this patch, it's very useful to have > basic stats provided by memory.stat. > > As hugetlbfs memory can easily represent a big portion of total > memory, it's important to understand who (which memcg/container) > is using it. I'm not really buying this argument. Hugetlb setups tend to be static configurations that require intimate coordination between booting the kernel with a hugetlb reservation and precisely setting up the application(s). In the few cases where you need introspection, you can check the the HugetlbPages entry in /proc//status. The minor convenience provided by adding an aggregate cgroup counter IMO doesn't outweigh the weirdness of listing a type of resource in memory.stat that isn't otherwise acknowledged or controllable as memory. From 1584134406376385943@xxx Wed Nov 15 12:18:17 +0000 2017 X-GM-THRID: 1584064111544134567 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread