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 318BBCCA478 for ; Thu, 2 Jun 2022 10:48:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2DD2D6B0071; Thu, 2 Jun 2022 06:48:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28A4A6B0072; Thu, 2 Jun 2022 06:48:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14D8D6B0073; Thu, 2 Jun 2022 06:48:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 079B46B0071 for ; Thu, 2 Jun 2022 06:48:51 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 31BE720D8A for ; Thu, 2 Jun 2022 10:48:50 +0000 (UTC) X-FDA: 79532972820.17.3F99787 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf05.hostedemail.com (Postfix) with ESMTP id C8C8F100067 for ; Thu, 2 Jun 2022 10:48:12 +0000 (UTC) Received: by mail-pj1-f44.google.com with SMTP id u12-20020a17090a1d4c00b001df78c7c209so9017874pju.1 for ; Thu, 02 Jun 2022 03:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mFpX60Bpgj1CZ/r9BaiZqjht5lWPMONlADO9gEwg/QM=; b=SwX3dVy3jXK2i5Z7uMI0MgELLNVc2oWbF7lRdRfsT9EqfOJ3hICdbNbgMYcXkoVooC MlgCxTXNf14Vl4M1M0BwPslA6dKzAvnrC5y8gpZ8KnUTdXkrj4uIpoCzfUwXG4KImXXC NzUsT2IT1TEgI1ZrOK8up2DZ0I7c9OpMbD2tFlQgWa/9mr9adaLsjb4YApgZvWlBZWa1 A6XaWRRCvcyCJT3zVWP4dYdYmYDcvN6KarzhSqkqS9tDFBh/KH4E3wEXilxg55OSCP8l cHTB6ytf08StwYuny4TYXUFaKL5qINmBT6/7EIo1wJYpEKwD8VEP0w7/zSs/Q5iCESf/ uTTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mFpX60Bpgj1CZ/r9BaiZqjht5lWPMONlADO9gEwg/QM=; b=4UCMy4wf4SVrVR1pqopvx4crGe7cNAtFREmHceRglgfRjre6nHbt/BjjTO21O9oa76 x7jd38PUtWbUqLSYUC8RdL6HsOLlwcJTtwOJVL1pXzJgDpNWXY8fXZvLZ00JreL9VxGo 8aatVRX/gnDUCavvUQIWNrc1hujTngZPZBSPAqSnXJbFyjONLB3WOAeVqNyt1hxx0p5d ZoZg1VmXZ5+Hd93EPrSsaay9N+uEiFObBGj81lczwYsA37xqa1YjFODbipKBJ+4KMSIA 0q41xKY1ivrfUMpL9QrIL681O1LkQqFKuzApQoC8A/WH7O43adeFsgWXdlUgVjhvlGqh LaEQ== X-Gm-Message-State: AOAM53050mzrtbaUN9qwU8iqDXJDJwwT1jxTK+IUVSWwxgHllF2wSOxf X6/qqate220B7qctz+G5lWgCBA== X-Google-Smtp-Source: ABdhPJwNnEekZvUy1mThm1y0ZTmyfYGaZQG0BXjujVjOVisYjgr6LYgikB1fIrA5FbqrkBSwmK65Xg== X-Received: by 2002:a17:90a:ae14:b0:1e0:51fa:5182 with SMTP id t20-20020a17090aae1400b001e051fa5182mr39393084pjq.60.1654166926707; Thu, 02 Jun 2022 03:48:46 -0700 (PDT) Received: from localhost ([2408:8207:18da:2310:2468:2a68:7bbe:680c]) by smtp.gmail.com with ESMTPSA id b9-20020a1709027e0900b00161d8153d56sm3111583plm.148.2022.06.02.03.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 03:48:46 -0700 (PDT) Date: Thu, 2 Jun 2022 18:48:41 +0800 From: Muchun Song To: Roman Gushchin Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , 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: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C8C8F100067 X-Stat-Signature: hutoyjhg5o4hym7pj7chkrwepgkc97em X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=SwX3dVy3; spf=pass (imf05.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.216.44 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-HE-Tag: 1654166892-699937 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 11:33:46AM -0700, Roman Gushchin wrote: > 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 :) > Sorry for the confusing. > 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... > You mean add more comments into the commit log to explain the usage of root memcg and root objcg? Thanks.