Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp864399ybm; Wed, 27 May 2020 09:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLnEKLvCsS7nrW6bN9bKGu2Fi3xSOc2ph1iWQV/m0d4O+Wdzw6d9iQMXlC2Ysv9V7qYQO3 X-Received: by 2002:aa7:c617:: with SMTP id h23mr25661916edq.305.1590598070402; Wed, 27 May 2020 09:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590598070; cv=none; d=google.com; s=arc-20160816; b=b6adernm77jKylva434oT/XnshYDqicMlIhXNZxIK3xaoMSqqNSc5cPMFk8cuEF/uG 5OFMcP2DCWDHQiLIeFnhi5El4JsOMpj4G2d8wuZ4HK5VEkENfcGYnsYwEwlZ4qxpj1Bc 4DnM7NLb/3av0AS+ucuZGlUtYiov1/zel5DgJkNgO276Ndme48+QaTTRQrMT6w3i5O7g 4UeAgi6EUPqAMXop1iyoQxZkMCB8fY2YDCSnoxEtZ2K0XZQftr7N2ld5rYEPF7Uzadc3 tvMtb+Xm+EN8SlVpx1JkKrXkQHxfyW9OfqPCtqgfVA5aSDk9VV51Kic7M+n/UG3BmIT+ xUQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=wN1igy4CP3ChHExzttYABl2lH0+oRuFCJ4TdYEo5Tl4=; b=SHncLbrRaP37OGWf/N2aZaDI+QcaGQmv7OtmlxMOOD2Ps/ASQwPd/5boGbIzzwO4v/ airqMjzeue6JViNHnxeQCqoR//Q8wn9PaxXHFfyq2M9wnQkEakjT9VDak3ER8/nOpDbD Qn0LnK95wjEoQc1QwrPxidJGcO6f++/VR0mfURrRZ5oSIsLS81QDaWQkl4rxlZsF8mfE 8khnS6mKDBX9FzeFWrjEIUwI6zeDDUWZPFSonh7Me41yzz0H88d24Hs19Ji2jCtYnJTb yESVbD6B7FbW4/xS3tPLT6Zg053aa0H3nRLO1CgrSd1KBUWheh9SUaPjHWav2XJcj5yD CsDw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a63si2119319edf.135.2020.05.27.09.47.26; Wed, 27 May 2020 09:47:50 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726816AbgE0LnT (ORCPT + 99 others); Wed, 27 May 2020 07:43:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:33688 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbgE0LnS (ORCPT ); Wed, 27 May 2020 07:43:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 45F3BB21C; Wed, 27 May 2020 11:43:20 +0000 (UTC) Subject: Re: [PATCH v4 03/19] mm: memcg: convert vmstat slab counters to bytes To: Roman Gushchin , Andrew Morton , Christoph Lameter Cc: Johannes Weiner , Michal Hocko , Shakeel Butt , linux-mm@kvack.org, kernel-team@fb.com, linux-kernel@vger.kernel.org References: <20200526214227.989341-1-guro@fb.com> <20200526214227.989341-4-guro@fb.com> From: Vlastimil Babka Message-ID: Date: Wed, 27 May 2020 13:43:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200526214227.989341-4-guro@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/26/20 11:42 PM, 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 You didn't add Acked-by: Johannes Weiner ( see 20200507204137.GC161043@cmpxchg.org ) (Noticed thanks to the great 'b4 am' and 'git range-diff' tools) Reviewed-by: Vlastimil Babka