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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FC38C433EF for ; Wed, 1 Jun 2022 18:33:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A0D98D002D; Wed, 1 Jun 2022 14:33:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94FE18D0028; Wed, 1 Jun 2022 14:33:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 839778D002D; Wed, 1 Jun 2022 14:33:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 730E38D0028 for ; Wed, 1 Jun 2022 14:33:57 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3AAC9AAC for ; Wed, 1 Jun 2022 18:33:57 +0000 (UTC) X-FDA: 79530516114.12.3E9CCB2 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf06.hostedemail.com (Postfix) with ESMTP id A57F3180060 for ; Wed, 1 Jun 2022 18:33:52 +0000 (UTC) Date: Wed, 1 Jun 2022 11:33:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1654108434; 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=3KXe7JyS/4SiYSTcpgOTrPkJ9VUQGQph5wJDhLq1PkU=; b=DQ8Mzwg5sWQebSxothCauYo0hX22gELn6PYnLRWohwSwso3mkoAi+6Eqf8yU60WzZIvpoq 7JA+jXgqBdR5ChOWnOD2G77XAHvgdMXfyGAwWd/TCPcZPqYQAecPj9aDhzScPFSGKTzNWd YgHzVCljqv4x3G7uwNjg9P/3YjJOfNs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Muchun Song , hannes@cmpxchg.org, mhocko@kernel.org, shakeelb@google.com, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, duanxiongchun@bytedance.com, longman@redhat.com Subject: Re: [PATCH v5 03/11] mm: memcontrol: prepare objcg API for non-kmem usage Message-ID: References: <20220530074919.46352-1-songmuchun@bytedance.com> <20220530074919.46352-4-songmuchun@bytedance.com> <20220601173434.GB16134@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220601173434.GB16134@blackbody.suse.cz> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=DQ8Mzwg5; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf06.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A57F3180060 X-Rspam-User: X-Stat-Signature: etdbo9eqzydhj1azyr3atjfqoihcfsw7 X-HE-Tag: 1654108432-686507 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, Jun 01, 2022 at 07:34:34PM +0200, Michal Koutny wrote: > Hello. > > On Mon, May 30, 2022 at 03:49:11PM +0800, Muchun Song wrote: > > So we also allocate an object cgroup for the root_mem_cgroup. > > This change made me wary that this patch also kmem charging in the > root_mem_cgroup. Fortunately, get_obj_cgroup_from_current won't return > this objcg so all is fine. Yes, I had the same experience here :) Overall I feel like the handling of the root memcg and objcg are begging for a cleanup, but it's really far from being trivial. Maybe starting with documenting how it works now is a good idea...