Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2208050rwn; Fri, 9 Sep 2022 10:01:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7mrLjYtlSNYhC/T0I7+iBp+wd6YT2as8mlRzpq8pn6z1SIN1ruF+5UHvZ9YuXVEFZUTe/M X-Received: by 2002:a17:902:c189:b0:176:b871:8a1 with SMTP id d9-20020a170902c18900b00176b87108a1mr14752652pld.30.1662742910245; Fri, 09 Sep 2022 10:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662742910; cv=none; d=google.com; s=arc-20160816; b=esw7mgn1rIh6TXnx0A64vNY7jrMm/FUGOuL+8WshkA30hItOaxLjFmPTwbjUlsGZZb a920HzxZqhM4leYg9p7pyXI9TFGDVo+DoqgP0pXDBQFtZVJAgtdPTxu1lhSHI41X8ciC EGhsadpHhv83lgC2NE93eU0++00/3qIaoVG5bojE5zQkK/ZLuKYRruNJeXj43eX2yNFj l+l0ftbA9B8TVed5MzaTmZ8H0VAMw+cmraFG6Lw9xIeLNxJSxVEw/emTEAsr1/XhoGCJ 1ma1zZqqsVUwIzdtIp808kaleH28bOUTn/KqnDwi0XRN5VB3K9UYxKA2u8O0EPyJjxQR l0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eDrfYVwDQC+B+QpEvQ41UIS7OrQEnld5CNSxZdpZPgA=; b=sS4n6B34LlzZS0EfJcMd5QlR0T+ysBTGl1YnPfD/rTkGqQWZ7YM1lAuQiKTnCoQYMY /8qTs38p0lrgG+rBOs+7IFyLhnyn5KU0UaQKyq6/qV7R1o7O0VJFRXG+8FyqlbKc/gPb 9KZmfaaO3LxHSiRjtNy7sD3dhLg11HY3iQd5CK7TX6oe/6uY99KNFdN+WZDS5+G5bpG7 cYUwvEENr7AP0p35XRsDJn/ErVVgjpXUwIorHOGWL06KzUrss9HLOLhTupo3M8fJUO+F b3vb+VQjsjtwIW1Ivxuzrl1FUiV4dWb85OaBkkmU/sj3rTMFtvicr0KWUBZRTk8egBby JYEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=F0wkqBGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a655ac5000000b00434a7995028si986275pgt.394.2022.09.09.10.01.36; Fri, 09 Sep 2022 10:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=F0wkqBGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230519AbiIIQML (ORCPT + 99 others); Fri, 9 Sep 2022 12:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbiIIQMG (ORCPT ); Fri, 9 Sep 2022 12:12:06 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09F2811E6C7 for ; Fri, 9 Sep 2022 09:12:00 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id iw17so2282873plb.0 for ; Fri, 09 Sep 2022 09:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=eDrfYVwDQC+B+QpEvQ41UIS7OrQEnld5CNSxZdpZPgA=; b=F0wkqBGJL1xYRFxmN2T75z4AIhNt1UbmivRoZwZ3KboiF5oDQtO7ium3Kzq9dCV+3L RP2ICzUpgzxqrq8hUXPMY0eGLmRwA+zAdDYSuZh9GUeWrGuwZqUh08H8pA77P9iEsPGp b6pnj6Rb9wFZ+c+JdoNtMdcrNCB7NeeWChdxumtbo3jnTMvn/m+9Yh9o+8/jqU14NYlo Uq/uY6XTV/gnfIa8IZ92OH+bqS6ePdD+EGQoRQq+nYue9IGW4Px3jClughrHNWAxX7uT XPnuvp8oyCH45KSg9104v6Oi+FYeivUUTm11neuKW+KDrm0old9h/hl2dytqCvmymdak rzBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=eDrfYVwDQC+B+QpEvQ41UIS7OrQEnld5CNSxZdpZPgA=; b=lKPUrpNPQ8lao1ATlrcQeW6CazEPoPv0PHg1ubK1/ZGiPcK9XwtemSXrBBkPdm8CPX /pRUnDv0I7flU8ErnZdL93ivUlYedhoPgue75L4p+cUJY2LzBh/9rW+r0Roi6TlLsAw4 vMhvnZHCXqrH5OYRQFd9p8yr9YdVBFzJOviz+aghcyypjNbGMIhVYMYF2+QVJ0dsXVuq 5/V43Zt3mTf3a/qW9hpgma2GR0N7fLAq9fpfuVHrJ0KxP9a1WMFGFhiNcW/PcgOtK09Q aKs6j1Y9Eyh4h25uH95Zl5uAj9aR1IPl/ZcCJqoTVDUKPog5PKzi0f3DLiKNc2BlJof2 MrHA== X-Gm-Message-State: ACgBeo0AJ27u2gGnp7bLD76i6xfnKG+o9nN4/gFLOLpc+VX+Mkx4Z35O sDa3gLWJ56YWAR2NGVgkrBsFTVEHIwwa1eFwf4G6tQ== X-Received: by 2002:a17:902:b410:b0:172:c9d1:7501 with SMTP id x16-20020a170902b41000b00172c9d17501mr14547983plr.106.1662739919860; Fri, 09 Sep 2022 09:11:59 -0700 (PDT) MIME-Version: 1.0 References: <20220907043537.3457014-1-shakeelb@google.com> <20220907043537.3457014-2-shakeelb@google.com> In-Reply-To: From: Shakeel Butt Date: Fri, 9 Sep 2022 09:11:48 -0700 Message-ID: Subject: Re: [PATCH 1/3] memcg: extract memcg_vmstats from struct mem_cgroup To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Andrew Morton , Cgroups , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 8, 2022 at 5:26 PM Michal Koutn=C3=BD wrote: > > Hi. > > On Wed, Sep 07, 2022 at 04:35:35AM +0000, Shakeel Butt wrote: > > This is a preparatory patch to reduce the memory overhead of memory > > cgroup. The struct memcg_vmstats is the largest object embedded into th= e > > struct mem_cgroup. > > This patch extracts struct memcg_vmstats from struct > > mem_cgroup to ease the following patches in reducing the size of struct > > memcg_vmstats. > > Is the reason for the extraction just moving things away from the header > file? > Or is the separate allocation+indirection somehow beneficial wrt, e.g. > fragmentation? > The main reason was to move away from the head file. I have not yet measured the performance impact of these changes. I am planning to rearrange struct mem_cgroup and will do some performance tests after that.