Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1234897pxj; Fri, 4 Jun 2021 09:13:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv/LFyuAuGNKw85Ef0A3cO6ijLiTQOET8j0GxxBm5pPZGyiioCiO++FDYjT1NW8x5XOaaT X-Received: by 2002:a05:6402:1648:: with SMTP id s8mr5597229edx.256.1622823193749; Fri, 04 Jun 2021 09:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622823193; cv=none; d=google.com; s=arc-20160816; b=sEa0CcY5hfgqTZbdON5iFXvYzHfDAd4ReAq4xk4p0WGRyPwvgSenecNF7Zy/V6XK7U 5GiUCC5NNgVADRbRVxEYD9+mqlX7V74QAxVEWgxoiNTlcxT4uUgojdt+Ju6ctHxqk8R3 ScsXTwbkAO1J8n6GUx8c+b1tNXKu/F2HyFb8v+CKhDfoPwTUPI9F76htMICN1wVP244r HcwwaZrh/s6DGrxUQgp8DinoYhFFRAk8pvlk23X+W+H2HKqFQjHT2TvlhRTdM4OJdrra O5IKwjoyfK8MBY0XL4ptANs+dAVGICNCzGVBuGL4XCvEmIdQLdCSHPxKbgQ2Ecde+OwL erLg== 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; bh=WmER0sPmJ9ixY8p+WTTY2FhzPf3j9TTlXo0+cEHTCt4=; b=nz5dwnw7d+4PDnnnPAYwTS0+eGFLcUctQktwjzL+wfModyNWqSzvR5s6gM+mbowzmc kOWVOSIeMcpwApnCK12WxBOXnubjoE4HRh8JSZYWTcINEi207N0kEm0yu6OnXvReuSca RVga3qIF/71quTFobziFc5escBBjVET1Hja684ikohPY++bUbDh+n5oBJj3D01RabM0h qhi6URMRWr4JZuT/Doqcc0yQ1BVXaw0z66uAJ41v06Mbz2spu9jjZKfjMPq6eglE2b+U PMLhYnPkGXHGYYg3R1iG5jyShl0bRPLOjW1QPw2L9vJhRbvh1IfomcffLeVHh25C83er kiYQ== ARC-Authentication-Results: i=1; mx.google.com; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si1410919ejv.307.2021.06.04.09.12.47; Fri, 04 Jun 2021 09:13:13 -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; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbhFDQMe (ORCPT + 99 others); Fri, 4 Jun 2021 12:12:34 -0400 Received: from mail-il1-f180.google.com ([209.85.166.180]:39471 "EHLO mail-il1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230034AbhFDQMe (ORCPT ); Fri, 4 Jun 2021 12:12:34 -0400 Received: by mail-il1-f180.google.com with SMTP id o9so9342310ilh.6 for ; Fri, 04 Jun 2021 09:10:48 -0700 (PDT) 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=WmER0sPmJ9ixY8p+WTTY2FhzPf3j9TTlXo0+cEHTCt4=; b=Ov+FNCp2K9h0Q8TXBjaEWytB7uXrE1SebSmmzumnsUDOHEiaBotZZjQfO8Bm/TevOx CV8bJipn1HT0V+yTJZYQB8bFbOo/ZfAkoeUfy+Cq6BQ7tul7GpTY27lcD1nZEBcEpMYG Vck9vhmACu03ZIieC9OfbrJbmwxHdEd11+ZvRRlafVYS3KSxA+qzF9dAW6M7mdqOJft8 QBAOH2x2tiSfgjqCxfgKBW+8J0jW6+0SK2Nqa8CIw0RxDrq7O5eYo2oAUwWT2Yc8MKd8 ij4EwJ2a4XK0h/FxpbPqBdYM3AKoy5sE4q5p+gYvkxMde6LEGijwnC8dlB7i1grZUfOl V/KQ== X-Gm-Message-State: AOAM530U7uOmy0WozCOYDDnJeIWjzD8rGDufippm4oRLahbTf6J6/UET PlJnnKwe8o3mAcDJjMv15bwjF/AIrqw= X-Received: by 2002:a92:cecd:: with SMTP id z13mr4491352ilq.252.1622823047849; Fri, 04 Jun 2021 09:10:47 -0700 (PDT) Received: from google.com (243.199.238.35.bc.googleusercontent.com. [35.238.199.243]) by smtp.gmail.com with ESMTPSA id c19sm691087ili.62.2021.06.04.09.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 09:10:47 -0700 (PDT) Date: Fri, 4 Jun 2021 16:10:46 +0000 From: Dennis Zhou To: Roman Gushchin Cc: Tejun Heo , Christoph Lameter , Andrew Morton , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] percpu: memcg memory accounting rework Message-ID: References: <20210603010931.1472512-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210603010931.1472512-1-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Jun 02, 2021 at 06:09:28PM -0700, Roman Gushchin wrote: > This patchset reworks memcg-based accounting of the percpu memory: > instead of using two types of chunks (memcg-aware and non-memcg-aware) > it treats all chunks as memcg-aware. An extra memory used for objcg > arrays will is compensated by a better chunks utilization, so the > total memory footprint should be the same or smaller. > > First two patches are preparational changes and cleanups on the memcg side. > The third one is percpu accounting rework. > > v2: > - make all chunks memcg-aware instead of on-demand objcg allocation, by Dennis > > v1: > https://lkml.org/lkml/2021/5/11/1343 > > > Roman Gushchin (3): > mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as > __ro_after_init > mm, memcg: introduce mem_cgroup_kmem_disabled() > percpu: rework memcg accounting > > include/linux/memcontrol.h | 5 ++ > mm/memcontrol.c | 11 ++- > mm/percpu-internal.h | 52 +-------------- > mm/percpu-km.c | 5 +- > mm/percpu-stats.c | 46 +++++-------- > mm/percpu-vm.c | 11 ++- > mm/percpu.c | 133 +++++++++++++++---------------------- > 7 files changed, 88 insertions(+), 175 deletions(-) > > -- > 2.31.1 > I think I'm pretty happy with this approach. If there is any issue with the delta of memcg on but kmem accounting off, we can tackle that separately. I'll need another day or so to review the last patch a little more carefully though. Andrew do you mind if I route the first two in my tree too? Thanks, Dennis