From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA68C38A2A for ; Thu, 7 May 2020 20:33:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CA126208CA for ; Thu, 7 May 2020 20:33:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="ql9fwMag" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA126208CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5FB85900003; Thu, 7 May 2020 16:33:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5AD65900002; Thu, 7 May 2020 16:33:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49CCD900003; Thu, 7 May 2020 16:33:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id 317FF900002 for ; Thu, 7 May 2020 16:33:52 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D7CA92C8B for ; Thu, 7 May 2020 20:33:51 +0000 (UTC) X-FDA: 76791074262.07.front74_5bdede7f28556 X-HE-Tag: front74_5bdede7f28556 X-Filterd-Recvd-Size: 3936 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 May 2020 20:33:51 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id n14so7639851qke.8 for ; Thu, 07 May 2020 13:33:51 -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=baTteJqyH6isN/89zdtKchdhH2DBXV9A3IqICZz/QOE=; b=ql9fwMagiN0bQ+ctBRPwFkrgKyHeVXx8Q80yLGh4UpVEp26yaQwCdGZ4qSDYv9RYRF kO01i1USbkS3uBGPMelctZrrOhx3sQb9AEJtWDGkzVCZk4jcDJNco2YCusnjNLDTjfE2 aKQCh+/AmnCztjhFrv5RSn0VZG8l9092XS88Z5bBA+I8HnB/wKRqzg0bKZ/yyBuZEl1l 73ohXJZ4eIMeDQ5gx4lV4qfBWWOaaqrvOc/l1qGXpol6sWFi9FQS9kBgsNwLbfXDpWix bcr/2KfsbPnwCRiI5qEbSa+EsuqImEZ3hMc2aHCmwj2Q0c3kuIxBUphC7AbLnITF0Xsw kJLA== 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=baTteJqyH6isN/89zdtKchdhH2DBXV9A3IqICZz/QOE=; b=gxX6T6dTQWOGlONA2UcLnq6ujvfiFYoSqDg6FbW7aV6pGMWF/0JqtuClPDf5+X+Az2 VKuoCHjAUIG0oPn7SIzyyagATN7AnJJDGkNtx8LNGzp7v4ugiIGeDknG0CuFcOV2eaUh H/SDuI1igm8MifQFnOlJdwlPoockr73m8GY7mmKw08jHQs1AukwMrwO9s8eY3D2KDsnG oy4BXsxWXL35OEXU1NM6quEC5okpwy/03Wy6575J7J6u0s/jo+7aAV1mRTMXDtQVhRJm 03KmAw2S9oAvp0UEfo+hCEIp+XjZYw429L2EA7HlqEYy5lgq5thI0Rhjqa+zjF7mXYKz 9KfA== X-Gm-Message-State: AGi0PubiJxv3fCIeu7tAoHPpiTuUN1rAhTZ+swIpJ9Gc/nImx8duMMt+ PZ69tdumDWVHa65i0eQzKaRoMA== X-Google-Smtp-Source: APiQypJN7/JRV7OJ8s/kqjkaowwIPEF6+tYYtQrtoPjYW1yZ84PCDiVZqt0gcfZGOSXWQap6ET6GdQ== X-Received: by 2002:a37:bd47:: with SMTP id n68mr16454193qkf.379.1588883630463; Thu, 07 May 2020 13:33:50 -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 a139sm5156158qkg.107.2020.05.07.13.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 13:33:49 -0700 (PDT) Date: Thu, 7 May 2020 16:33:34 -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 01/19] mm: memcg: factor out memcg- and lruvec-level changes out of __mod_lruvec_state() Message-ID: <20200507203334.GA161043@cmpxchg.org> References: <20200422204708.2176080-1-guro@fb.com> <20200422204708.2176080-2-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422204708.2176080-2-guro@fb.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 22, 2020 at 01:46:50PM -0700, Roman Gushchin wrote: > To convert memcg and lruvec slab counters to bytes there must be > a way to change these counters without touching node counters. > Factor out __mod_memcg_lruvec_state() out of __mod_lruvec_state(). > > Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Roman and I have talked a bunch about the function names here. They're not optimal, with mod_lruvec_state() doing the entire intersection - node, memcg, lruvec - and mod_memcg_lruvec_state() being a specific version that does not update the node. However, the usecases for mod_memcg_lruvec_state() are highly specific, so the function won't be widely used. As such, it received the longer name, and we get to keep the shorter mod_lruvec_state() for the much more widely used function.