Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1054339ybj; Thu, 7 May 2020 13:45:57 -0700 (PDT) X-Google-Smtp-Source: APiQypLUXt/lY/zCkxl/R5PSNpOrRngLZP8JxvTndu+G8QGbv/j51/0Ulbbrml3UnCCKrJUwqQLH X-Received: by 2002:a05:6402:154:: with SMTP id s20mr14267368edu.224.1588884357398; Thu, 07 May 2020 13:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588884357; cv=none; d=google.com; s=arc-20160816; b=muvcjWKp+lpA21UlmkwWhHzmHmZ4B9y6KFtxIdWMCQor9leDwA1w5ajXYu5krl2giD BM8KSxy6LGV3B0LiBNzXy+PbIufb+czp7dNA5h6AqCZi3hEI8MGqiNhoU6WV2B9DyeNI wssHHj4ajOT0rtZAsUDrAPiPT/yyphPsV2CA2tBuc8VBV1iICiiBTVZNrXa2rW91F8u+ 8qahlIQ1CtFF/0Bu9/vikUBn+6pXrtfswAV4lx5qFKAVmWLYePulIFm+gtv6wk0K2qN4 U9EdBVOD7rtq7uX7s63V7Zg4sV1tfKuYtSn2rmreH5uw5Ktqc8hOZEi8DbxvKsMX4t06 LQDw== 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=2sEB/hg7nI765KO+sGVWwlpeLWhkT2BGkQB6agKb2hg=; b=i3CO3T6IM0Wusk51G6cy8XVHXhCGrG18IsaJUw69i4GQ2h0N9pJSVPY5pUgF3gqzEa /pyfhChL3xmbBwKxJFogzGESdRNmkxYrCbT443YeZfbrB4WpAZ+eyOrGqRw6d1PbNUcA J1Taju7YoVvQdsauO0U7/ZZxihAqIH/9qhtQplVQHFXVZJj4PrsEimabxMlrSHZ8vMlH YRv08QrFJ4r0iUm0FJ7Dm4ZLuKkWgA/wT3bpfzwOPp/6rE4EJNmEXfVFD3g3vKu5eOEv GRW0hME2dJh+XpdJ1MIsppTjswLy+yD2c6ZlKPUTFOEwSlbIOwqGgO2YzUkjm7R3MTd7 rWfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Nwem4RCa; 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 i10si3946143ejc.284.2020.05.07.13.45.33; Thu, 07 May 2020 13:45:57 -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=Nwem4RCa; 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 S1726476AbgEGUly (ORCPT + 99 others); Thu, 7 May 2020 16:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726093AbgEGUlx (ORCPT ); Thu, 7 May 2020 16:41:53 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 916E3C05BD43 for ; Thu, 7 May 2020 13:41:54 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id z90so6006393qtd.10 for ; Thu, 07 May 2020 13:41:54 -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=2sEB/hg7nI765KO+sGVWwlpeLWhkT2BGkQB6agKb2hg=; b=Nwem4RCafQxZA33I/DLrM69yNQA3krWl4ud0UnNMG9VzRbX1rvD+mOYuD9jq8gQtVM hm1F/6YeZSVOG/YCsce0dv+dEffsc/eU+lVTscpPG7eP2PfZa10dW6MWDhglGxaucNyC Wig6bmpO7u4wivFDSS1LpFdCu6EGCsWQ8CXryFVeqGh/giUrPy0jD2CcXqQFWaPesihT l16e2vDapQh6mqjA9/QHI48HmABDeBlYiZ3UHtY4IVulYJcM1AfSvd/2cZ1rCQgAVN2y Pcz/cuf2p0U1WGJW0UUJB0S57uDbXVgrLIthO6cBbGMzFmvwWDbfWD0qPuvo4NNor1WX 5hMg== 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=2sEB/hg7nI765KO+sGVWwlpeLWhkT2BGkQB6agKb2hg=; b=RrCoY0DVWB2ypKIKqsKhU+Xv87E1MjXDJmlB9upYUkje6ckrXf45Teq5UFgbPoZikz IPxX+VcBHBEM7vpFD/dm/7IAjwKQI1pF9T6a6XkB48SChW2b/TSS0UxhcoqzaFEHbg5i EKjZR4PnJ2S9RWQU+fllFFhaxr6H/eMfo4aBnEGv1hQS/oLrGF58rsf6tyCsZ8Ll3eve nHaWdp+Y/XaxHbWKRsu+QkWna5OzLVNxuUo968muksawoQ/gRSSrQZP63T2zuqI/Xx1+ JFpn8Pbzywoix99LemPHFWUYKnJi83pXDZvKt6XdjaPnnyzxgl83GJSO7/TeS7SUu5Bt BcgA== X-Gm-Message-State: AGi0PuYkr9NT7C3iT8jAd+VImLUUoYO7HYKAmi3FX+jAslFJJe5qGFOP OF9FZkkCcKguFpoljUb4NxRmM/JGxQY= X-Received: by 2002:ac8:120a:: with SMTP id x10mr16458805qti.127.1588884113745; Thu, 07 May 2020 13:41:53 -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 v130sm5056159qkb.39.2020.05.07.13.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 13:41:53 -0700 (PDT) Date: Thu, 7 May 2020 16:41:37 -0400 From: Johannes Weiner To: Roman Gushchin Cc: Andrew Morton , Michal Hocko , linux-mm@kvack.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 03/19] mm: memcg: convert vmstat slab counters to bytes Message-ID: <20200507204137.GC161043@cmpxchg.org> References: <20200422204708.2176080-1-guro@fb.com> <20200422204708.2176080-4-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422204708.2176080-4-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 01:46:52PM -0700, Roman Gushchin wrote: > In order to prepare for per-object slab memory accounting, convert > NR_SLAB_RECLAIMABLE and NR_SLAB_UNRECLAIMABLE vmstat items to bytes. > > To make it obvious, rename them to NR_SLAB_RECLAIMABLE_B and > NR_SLAB_UNRECLAIMABLE_B (similar to NR_KERNEL_STACK_KB). > > Internally global and per-node counters are stored in pages, > however memcg and lruvec counters are stored in bytes. > This scheme may look weird, but only for now. As soon as slab > pages will be shared between multiple cgroups, global and > node counters will reflect the total number of slab pages. > However memcg and lruvec counters will be used for per-memcg > slab memory tracking, which will take separate kernel objects > in the account. Keeping global and node counters in pages helps > to avoid additional overhead. > > The size of slab memory shouldn't exceed 4Gb on 32-bit machines, > so it will fit into atomic_long_t we use for vmstats. > > Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Thanks for splitting this out, it makes both this and the previous patch easier to read.