Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp497666pxa; Tue, 11 Aug 2020 08:07:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjTTc+59WfYTMbDKkcb+xvR6rD83ajKMZ+2s1lnBsqKzh8c9Y01pB3TFDM1B5ouD7D89bh X-Received: by 2002:a50:ccd1:: with SMTP id b17mr23449369edj.165.1597158462448; Tue, 11 Aug 2020 08:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597158462; cv=none; d=google.com; s=arc-20160816; b=Ngm/aMkR5bPRT/t/YeehXn3+iDZnzFY4vtquutBjGRDCWOTWV8Nk92AyeQZBkXX8H2 rwbVOZZWQJOd4VpcCDfE+E0Fj4EycMWcqQTxviAnEZ8xbuQuTy2kLMKxN/xwm4F/EAh/ 9UEngzKfEkIS/GTf1p9e67tXfTqUc97g96iwbcufZlswIpncr3POs/zkwuAsdM7qJSn7 bUl9h8pG1aKLBKKon+sef4ezimLZN7ul/1Ly9ROrggnlhiHd4RQGFvb6aKajp00glYxo T9FchrISV6biONIGOMQlvO0oZVCc4xLEZEuKGYFLLlIZcg4Q+kQRPLJyuBg43O5WiUiu bnIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kKnx53M5XbyLLCCwOSDObubCS6cU/NfvJWrtPaFaVlk=; b=dcvKOS5gaoMIBPcwlapsg4v1x0eGcmf89CI5pLw7LFH685dkQHlcBo7ALxFPCm3EWO 460SmUQIgfujzw7uiQPTCgy8BoxDRKfuCs0ae6J+Ndeo4h45YId5clbBVhrAPetHVWaO meYKJ0jsNQj9uJE3AfoS314hMrwnJXTzEtxsCEw1sCZYQbuN8UjheYXaaHvJBjAZMILw YS0SxGmTqtIIaJ4mv5Qe3fNMvShn9akNPhpcyhZXBMybJomQsCKJX6T1+8R/bqdorWJJ YJ4IGXpXWiLOGtEygY3x7DnRaHBv5+NFLiwHpZtvtlREuAwoFzlNY5NOjyY4wzHjnPTT KsTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Bv1Bl02L; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si12634706edy.237.2020.08.11.08.07.17; Tue, 11 Aug 2020 08:07:42 -0700 (PDT) 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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Bv1Bl02L; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728906AbgHKPGO (ORCPT + 99 others); Tue, 11 Aug 2020 11:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728850AbgHKPGN (ORCPT ); Tue, 11 Aug 2020 11:06:13 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43A1CC06174A for ; Tue, 11 Aug 2020 08:06:13 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id 2so11900740qkf.10 for ; Tue, 11 Aug 2020 08:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kKnx53M5XbyLLCCwOSDObubCS6cU/NfvJWrtPaFaVlk=; b=Bv1Bl02Lx3IaqeN2DkPY+ruc6fzBfowKMA7iiIPJ+DiAJZsOy8szw6aoZ0TStGaHpZ xilghORcnZqO5cX19vjFxySoMjbUkRFXfaZzw58Vc+NvQYR05SwB7jf9SpoISlQ6iZy7 dH1q403WO9OyWx0Z1nBbVbDc3Q4OihzLrYdrkNSOIzak0CHZwtUdc3Uh/25RvlQo/O1L MnHoRfiTJ8rffT0ZepO4EWKqT7C/MNOc+lJa95lHzm0yHnksRf2JKSHIcet0AEiAXEIi yMYJRK+Rm585q5ija7lhtB6mcKBWueW8BXrbPC5RnW9kvgoABAOO+Br1w5uKFRHA8t+S bVUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kKnx53M5XbyLLCCwOSDObubCS6cU/NfvJWrtPaFaVlk=; b=pZRkNsMJ4HSFbfHzqRT19F+dsrxpGo1LwwTbNJ4b96a3IJRXjcZBhoV1dOdUKGOSG4 PE/zxBKux8hKwM8X0oi/OwIybbGl+u1IC7EU3dysUl/Lgx9GVX2entzFxdjk2QiyYAnZ /IkceN7GRYW+TYrr8D89HK65W+nlVl7jHUcDANEfODi8xww/ExwOzvrX0G7lbmN0OWJq azzSy/UI9mjkYobTMXcSw7nf6soaImnN5GjL4Uv5w4V5PLXLRlQTP0wr7CKB5kxVI4n8 JZZXYVIsQFEEuPutVVIqBx1h454y+cFGo6niuwD+vKW7W2pZeTj4WuIPZ6nrX1IDmkiB 6rwg== X-Gm-Message-State: AOAM532VJeogpnJqAe7vNSuydQSL+SZs6JUDlcp5P/zCI2j3X0AWwNS2 UellSgFh0XPBpxrpbxwCIhvAFgd6/uU= X-Received: by 2002:a37:a354:: with SMTP id m81mr1571997qke.277.1597158369961; Tue, 11 Aug 2020 08:06:09 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:2dd0]) by smtp.gmail.com with ESMTPSA id k48sm21761270qtk.44.2020.08.11.08.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 08:06:09 -0700 (PDT) Date: Tue, 11 Aug 2020 11:05:05 -0400 From: Johannes Weiner To: Roman Gushchin Cc: Andrew Morton , Dennis Zhou , Tejun Heo , Christoph Lameter , Michal Hocko , Shakeel Butt , linux-mm@kvack.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] mm: memcg/percpu: per-memcg percpu memory statistics Message-ID: <20200811150505.GA650506@cmpxchg.org> References: <20200623184515.4132564-1-guro@fb.com> <20200623184515.4132564-4-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623184515.4132564-4-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 11:45:13AM -0700, Roman Gushchin wrote: > Percpu memory can represent a noticeable chunk of the total memory > consumption, especially on big machines with many CPUs. Let's track > percpu memory usage for each memcg and display it in memory.stat. > > A percpu allocation is usually scattered over multiple pages (and nodes), > and can be significantly smaller than a page. So let's add a byte-sized > counter on the memcg level: MEMCG_PERCPU_B. Byte-sized vmstat infra > created for slabs can be perfectly reused for percpu case. > > Signed-off-by: Roman Gushchin > Acked-by: Dennis Zhou Acked-by: Johannes Weiner