Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp941614pxb; Thu, 15 Apr 2021 09:59:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeaS0Cbssgc5yvG+PkBTKHi5FNF57ZFP91gKaf4yewhWwqfdSux8RS9hZWtnqcV72T9apE X-Received: by 2002:a17:906:af94:: with SMTP id mj20mr4437983ejb.279.1618505957569; Thu, 15 Apr 2021 09:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618505957; cv=none; d=google.com; s=arc-20160816; b=CcRkHA+pLqzCHsTTB6eM6nQDVbSQyX5Hk9tlES/iPhUW6JI59U4A4Bo8yygGzAwSsi UT/36I+j1RM7LGY2lFZaTqPH2bMBI8hIvH/gesmFPGjED/emj9b2uQWtb8YInfbsTyQF hroNSbGHXblCW9f8L5pjhAg0qTPzbhG3s+X4rCEHsPHkaAgES7qcimFzz0X8toDG39dL gfVjmz5xGUTFxlHw/S/KhwtZML7cwufA0mL9lU/jd4l94seeoGeu1/Xzvb9PUauIhVw8 xLHmrUWZnHpDPRprGVktjw7L7qKcvvV3LmHSv7iTR7FmJRt61goFuLOtRV/PesZmy8F9 Lv1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8CoVbt6IzeLUC5q7IpdX1He4bycqg82PFofNsjY3nlo=; b=syBr+yY7IcQsePRogt4lwOHODlXEfk/g3wg5ACjzOZFBEUABH0/p3SRfWMihe8jMT5 Y7Y5RS/kZQNbo2QjKsvGbwHc6/eeOZOf+7NzXWRjSB+fMbz92wgyQjqc6uzyHs83LEhC YXw5sbEP0C/28F4yglDkSW8ghxZjkyRU0qW/x/8ARbyqouzyTixFVt+ThJ2K84T2s7pC kYLcvGAwgVd6uYmAQIrCvHHSjz59psZ2RKtoK8hzbiwIFPexFrXR7OTPqVNcER4Uijvf pKpyquw3IYKgfQlNyKoA2o/T/MuIJ4H5plMThqJwv3gteVDvoUH/VwubXjwE9GlIa7X7 3XGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=dz805Z+h; 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 w10si2624849ejn.570.2021.04.15.09.58.54; Thu, 15 Apr 2021 09:59:17 -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=dz805Z+h; 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 S234286AbhDOQ6T (ORCPT + 99 others); Thu, 15 Apr 2021 12:58:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234267AbhDOQ6T (ORCPT ); Thu, 15 Apr 2021 12:58:19 -0400 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5607C061574 for ; Thu, 15 Apr 2021 09:57:55 -0700 (PDT) Received: by mail-qv1-xf2c.google.com with SMTP id i11so6505350qvu.10 for ; Thu, 15 Apr 2021 09:57:55 -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=8CoVbt6IzeLUC5q7IpdX1He4bycqg82PFofNsjY3nlo=; b=dz805Z+hx47wOwNMrHi3cTS4DU3UR/WoK/LOkLO4wjGFRvU0R2UR/LM1Jr5qmO+UfX Xj8eZgLigKlOmHDihOrF/lge4KjH4S1MbzQ1M0phjbomNKF4n6kf/MMrGg1Ou+v4T6oN hKy0W1m35ceAeVYDrHWoHULB41E5JJZzzI3D2kUw76zXNtQ3bamQFVNjksr5O8mNKpMf 4W4khLTCWvVPTlyDZi5xBNYSSFRlRicGN+SQevM04Aa6pNLQ7jNhYYrcky177RipPj2F 3TdlR6C9GSq2z9Q4NoV8m/FUwzOffvwttLpLK7cohfEQM759tvqvn+nzZANak8XsuIDd EQrQ== 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=8CoVbt6IzeLUC5q7IpdX1He4bycqg82PFofNsjY3nlo=; b=TCwrgJDc2+r55z0Qa5va9Nee+VB5++MW9L9dTJPOc2rIQEZnJ0JRlPBYGpkkqK7sTZ mesYnbp7NEJWPQW/VdkRMlEuUHI9NevFWyh9AVjBUCfMRAz8OSrwcErJlem6ptxpg/DK nq5OE22SlZMKcbNqYeaSxbJD6wankfMNmzgLnjA0I3w/HAbrta51y/kt1BGLXxW/Nj4r tK1NiYOl2TCHCrR2AjxbTNWB1RNMkWltD+x/U8d7jhGgwHQ/wRQDw9vMxlJqNpQX8EQ5 TrQeSw+EL3MKKy77yxEQFE5IrA+6Izy9wF4I+bV9rPk2MBjtiIAdaU3ksAM6FJJTuxd2 EvRQ== X-Gm-Message-State: AOAM530N8Uu1XkpB5NMGkfSfjhiD3hsuryFcKZFnq4PJc10W8G+slz/r 3Mn46pl3uBuI84l7UwQFwO5cOQ== X-Received: by 2002:a05:6214:ca4:: with SMTP id s4mr4142968qvs.44.1618505874966; Thu, 15 Apr 2021 09:57:54 -0700 (PDT) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id a202sm2402124qkc.13.2021.04.15.09.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:57:54 -0700 (PDT) Date: Thu, 15 Apr 2021 12:57:53 -0400 From: Johannes Weiner To: Waiman Long Cc: Michal Hocko , Vladimir Davydov , Andrew Morton , Tejun Heo , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Shakeel Butt , Muchun Song , Alex Shi , Chris Down , Yafang Shao , Wei Yang , Masayoshi Mizuma , Xing Zhengjun Subject: Re: [PATCH v3 4/5] mm/memcg: Separate out object stock data into its own struct Message-ID: References: <20210414012027.5352-1-longman@redhat.com> <20210414012027.5352-5-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210414012027.5352-5-longman@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 09:20:26PM -0400, Waiman Long wrote: > The object stock data stored in struct memcg_stock_pcp are independent > of the other page based data stored there. Separating them out into > their own struct to highlight the independency. > > Signed-off-by: Waiman Long > Acked-by: Roman Gushchin > Reviewed-by: Shakeel Butt > --- > mm/memcontrol.c | 41 ++++++++++++++++++++++++++--------------- > 1 file changed, 26 insertions(+), 15 deletions(-) It's almost twice more code, and IMO not any clearer. Plus it adds some warts: int dummy[0], redundant naming in stock->obj.cached_objcg, this_cpu_ptr() doesn't really need a wrapper etc.