Received: by 10.213.65.68 with SMTP id h4csp954034imn; Wed, 4 Apr 2018 10:00:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/BZVbAqHrTj6R87yUT4zAKJn9LJBAC/vJ7GxkRdLKu63/j6aea9wGvrAIUpkcVjxTHd16O X-Received: by 2002:a17:902:b08a:: with SMTP id p10-v6mr19496799plr.60.1522861215746; Wed, 04 Apr 2018 10:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522861215; cv=none; d=google.com; s=arc-20160816; b=pOEu1p6frvmFmobBTppF4dZa2GhWSEJ2DELQfsn8Z/jJ8Gc8P5pvK0FJpHPjlOMuZq XkIdT5diC3SKiQmDI0xIYUfLXC6ZrBn0qdG1bkV7I/bZmd5sSgpVprEoPTjKOIiZpXcv VH7E0Et+5OqYpXlQ0EAurDFzn2EXSoXr6ul8R6bEcFeUG6VW8u/rByJm/qodMgwtPuPU VRz+/brNmw0OVg5wD0I4JPkPKPkntztqSVkpm61ZnhJ/303PfaAzN00xh3pwweoLRgX3 xOzc2bHwOSoUdVeobjZtG7v+39Gp57Zr55DEE2msowmbqYSSlZeeA775E9ev4cSycRgD unAA== 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=epoN4Th0eB74UGZq+OeEAZ7LRzqpdsK53mDZcFiDtps=; b=uq14q8knI+jvh6tYHp1rdGvpOnueJj9H3/GaIftx24Qr0rIHK1LSZ//AH521uaBA/B mfsq2xLS4EKS5O1ovalhkGwJeDMskILUbn5cm36F7dWgB6QzW1w+6daoKXTGN7DGEQ8i MDQxR00c/tYLCacyoc53++MHo4PWQZL1vLxJNp7dSSWwqKlkJPyCfVhEFI5fwsfFGEfA VpX+gA2tckW4QOaBnzgd6suRLBgGktckBi5ce7VoZQQBKCGP+ylbuE5Nl4hQMvBHtsJ+ hwoZeEF/F/GwcmMf8blXBccsnm0VzaOYv38eW0xJNTsBaiF55oNJcdbWqba+xIqD1Lsu NKsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=R6HmM2Hx; 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 37-v6si3486041plq.288.2018.04.04.10.00.01; Wed, 04 Apr 2018 10:00:15 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=R6HmM2Hx; 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 S1752601AbeDDQ6g (ORCPT + 99 others); Wed, 4 Apr 2018 12:58:36 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:37232 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069AbeDDQ6e (ORCPT ); Wed, 4 Apr 2018 12:58:34 -0400 Received: by mail-yb0-f193.google.com with SMTP id u5-v6so8814674ybf.4; Wed, 04 Apr 2018 09:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=epoN4Th0eB74UGZq+OeEAZ7LRzqpdsK53mDZcFiDtps=; b=R6HmM2HxnsaaCPmZNVyFJQ8L2UHi0MhIKs0lKtTBokxNtf9JF5fqZ9+sS3k9Xk73D1 PjqV2KkGU+amu3FbO2lGDxIbpLwNJzJ7+AKSt87q6jgJZlINBiY6LG9MdiVgm8IdVIFb X30G0iTWie52eiGchia2h8aYnSPEoZ06tB31MLYbGLKidZV7CejsyJ0zFJ7wC1oo4OId iqB+TyUb4cIhbYVL36KNl89z5X6XFPxl40lUkFbi7wrIHoQ9vewgfkNZY1MF2pcJ84l7 VFUFUAs8yXRIZ7j0lPokdqZrLH2+9aGAdSGdJjCf25AUs8VPbZiMJYZDLvdV0XzZ7NM/ p3Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=epoN4Th0eB74UGZq+OeEAZ7LRzqpdsK53mDZcFiDtps=; b=qBuMZi46ATBtxW/N8nWQHM6SbPlBIkfxyTRVfc+TF6TQRZBFKduH06sCfuKMr3BWmd gDxcoyyMzgwCsFrUKQoUNKowNkoMcIrP7LG8w9Gw1TbLlMnW9AVdffLz7LW98nJ5pbBu qUv9SM73DRz2wkDLdMn9gB2dVfz0Yu2gmA4NSVq6FdVKHPKmoO9Ewt9JYxxXi0SenSfn PYpTb7y2rZzsKiGzzk0dLT1IuctfItuFI0hLnmF4oIhgwuOWWzxaNEqFrtTBCmk2lW00 kPbAEwVET+bY+bgfFfP1+PZA+vxydEXfD0CpZojsGQYtTdnQ/Lh0P+ZDOzZATXbSL6Ys rBEQ== X-Gm-Message-State: ALQs6tB/rNeO0BaGGDL+Uw26o3aaeezbYjp3bPP0JE6Qj3PTRX5OUwP0 X5VEaXhQ9UYFm2ZEfwhPxBk= X-Received: by 2002:a25:d296:: with SMTP id j144-v6mr10683151ybg.53.1522861113638; Wed, 04 Apr 2018 09:58:33 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::bb10]) by smtp.gmail.com with ESMTPSA id l184sm2280477ywe.106.2018.04.04.09.58.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 09:58:32 -0700 (PDT) Date: Wed, 4 Apr 2018 09:58:29 -0700 From: Tejun Heo To: Michal Hocko Cc: Johannes Weiner , vdavydov.dev@gmail.com, guro@fb.com, riel@surriel.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/3] mm: memcontrol: Use cgroup_rstat for event accounting Message-ID: <20180404165829.GA3126663@devbig577.frc2.facebook.com> References: <20180324160901.512135-1-tj@kernel.org> <20180324160901.512135-2-tj@kernel.org> <20180404140855.GA28966@cmpxchg.org> <20180404141850.GC28966@cmpxchg.org> <20180404143447.GJ6312@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180404143447.GJ6312@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Apr 04, 2018 at 04:34:47PM +0200, Michal Hocko wrote: > > > The lazy updates are neat, but I'm a little concerned at the memory > > > footprint. On a 64-cpu machine for example, this adds close to 9000 > > > words to struct mem_cgroup. And we really only need the accuracy for > > > the 4 cgroup items in memory.events, not all VM events and stats. > > > > > > Why not restrict the patch to those? It would also get rid of the > > > weird sharing between VM and cgroup enums. > > > > In fact, I wonder if we need per-cpuness for MEMCG_LOW, MEMCG_HIGH > > etc. in the first place. They describe super high-level reclaim and > > OOM events, so they're not nearly as hot as other VM events and > > stats. We could probably just have a per-memcg array of atomics. > > Agreed! Ah, yeah, if we aren't worried about the update frequency of MEMCG_HIGH, which likely is the highest freq, we can just switch to atomic_t. I'm gonna apply the cgroup stat refactoring patches to cgroup, so if we ever wanna switch the counter to rstat, we can easily do that later. Thasnks. -- tejun