Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C506DC61DA4 for ; Fri, 3 Feb 2023 17:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233170AbjBCRm1 (ORCPT ); Fri, 3 Feb 2023 12:42:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231526AbjBCRm0 (ORCPT ); Fri, 3 Feb 2023 12:42:26 -0500 Received: from out-2.mta0.migadu.com (out-2.mta0.migadu.com [IPv6:2001:41d0:1004:224b::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AC2C2135 for ; Fri, 3 Feb 2023 09:42:24 -0800 (PST) Date: Fri, 3 Feb 2023 09:42:11 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675446142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZYvx87/bApyuUVwX/LObDHee8cS4wUlkoRlwfbD39PE=; b=LGHrzaZwAx29gBlXOkLljkso6NQ92suLDFaEogkOQt1FEn3w8ek0TBLiGtVX57Q8fwq3qI LZCTIUAkK3mdrLn3A5V/7RuWxv9SpZkZtBTARwGqciKa8ttsyGiY2Z+CaaY2plO61J4wrr o7dBN5HJfu98Di+SvTaYhw2SUg3NLNM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Michal Hocko Cc: "zhaoyang.huang" , Andrew Morton , Johannes Weiner , Peter Zijlstra , Shakeel Butt , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Zhaoyang Huang , ke.wang@unisoc.com Subject: Re: [PATCH] mm: introduce entrance for root_mem_cgroup's current Message-ID: References: <1675312377-4782-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 02, 2023 at 09:27:39AM +0100, Michal Hocko wrote: > On Thu 02-02-23 12:32:57, zhaoyang.huang wrote: > > From: Zhaoyang Huang > > > > Introducing memory.root_current for the memory charges on root_mem_cgroup. > > Charges are not currently accounted for the root memcg universally. See > try_charge which is used for all user space and skmem charges. I am not > 100% sure about objcg based accounting because there is no explicit > check for the root memcg but this might be hidden somewhere as well. root_mem_cgroup has no corresponding obj_cgroup: see memcg_online_kmem(). Thanks