Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5868447ioo; Wed, 1 Jun 2022 14:30:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC7Sa3o0VMUk77vKCCcYf0Iz/bzMW/+frlXZfGBN09xwreVyROdvJ+6GIiRM0r03Iea1yI X-Received: by 2002:a17:903:2cb:b0:14f:4fb6:2fb0 with SMTP id s11-20020a17090302cb00b0014f4fb62fb0mr1393204plk.172.1654119045197; Wed, 01 Jun 2022 14:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654119045; cv=none; d=google.com; s=arc-20160816; b=jy6a1O3AGb7Ok/YrQOokradhesOfxaHR0iBiG0glu7ZT66lwNhYqdu4B8VTIZna77N WjQvvBZmjjAC7N56Cz1G1JZViIBqJm0lCMsrshEvqo+qT4kkLjJzpGIcDdFM/hzxHUPG KAMVkzfM4+UArhvzdywI6azBhc1CnVMzNadbRPUldIWH9uc/uz/ZayclA0XQmTL+f32A ZyH7KE9D8gjv31F8IjtCkV8YpummKetO9aRLiMpYYosxJIDaBH1qspYpwG97do9ZZ2O/ X92sNysYIFKsy6lch63Cnyt79OtKgl3hrP70HT2CR9McE/grJ7pDeabBphgkDpCp2bpO qQlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=3KXe7JyS/4SiYSTcpgOTrPkJ9VUQGQph5wJDhLq1PkU=; b=juO8xgHrepFKvNvtC7BLcRw08Y3uOfPSiUlNnaEFbetBDhoDP4rX8EWIP2Dy884UG2 4JCaHBzs4U8P47wN9nEQa1ixqhQViiDbLO/P18vNaMz8I/TOB4pJBaKKjVHKHjGqhn/w 9nm7gpS0D7eNBzJsFman4te3hX3BEEhPC9BGNhm84j8xYwgDoynk/yuN1d41VdGXySFj u1NHMIEUOa/c2r/oFrksf4/kkLZTEn2JENA4oRDhXaV6FJfd3W63KFIhSGoBQVUyj7oM 0E7cZfTRZolBzLo22+NtXGM35NUp4j9jwulLY8Yjq8MdlQTUro9FJcP48BsJoN/MyOEd fBbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DQ8Mzwg5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b27-20020a630c1b000000b003fb194f55f8si3040381pgl.432.2022.06.01.14.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:30:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DQ8Mzwg5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 03702197F4D; Wed, 1 Jun 2022 13:21:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbiFASd7 (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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...