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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D4DCC43334 for ; Wed, 1 Jun 2022 18:34:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231454AbiFASd7 (ORCPT ); Wed, 1 Jun 2022 14:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232007AbiFASd6 (ORCPT ); Wed, 1 Jun 2022 14:33:58 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C74AFAC5; Wed, 1 Jun 2022 11:33:56 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...