[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220105170348.GA21070@blackbody.suse.cz>
Date:   Wed, 5 Jan 2022 18:03:48 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     willy@...radead.org, akpm@...ux-foundation.org, hannes@...xchg.org,
        mhocko@...nel.org, vdavydov.dev@...il.com, shakeelb@...gle.com,
        guro@...com, shy828301@...il.com, alexs@...nel.org,
        richard.weiyang@...il.com, david@...morbit.com,
        trond.myklebust@...merspace.com, anna.schumaker@...app.com,
        jaegeuk@...nel.org, chao@...nel.org, kari.argillander@...il.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-nfs@...r.kernel.org,
        zhengqi.arch@...edance.com, duanxiongchun@...edance.com,
        fam.zheng@...edance.com, smuchun@...il.com
Subject: Re: [PATCH v5 13/16] mm: memcontrol: reuse memory cgroup ID for kmem
 ID
On Mon, Dec 20, 2021 at 04:56:46PM +0800, Muchun Song <songmuchun@...edance.com> wrote:
> There are two idrs being used by memory cgroup, one is for kmem ID,
> another is for memory cgroup ID. The maximum ID of both is 64Ki.
> Both of them can limit the total number of memory cgroups.
> Actually, we can reuse memory cgroup ID for kmem ID to simplify the
> code.
An interesting improvement.
I'm a bit dense -- what's the purpose the MEM_CGROUP_ID_DIFF offset?
Couldn't this deduplication be extended to only use mem_cgroup.id.id
instead of mem_cgroup.kmemcg_id? (With a boolean telling whether kmem
accounting is active.)
Thanks,
Michal
Powered by blists - more mailing lists
 
