Messages in this thread | | | From | Yosry Ahmed <> | Date | Tue, 3 Oct 2023 12:47:25 -0700 | Subject | Re: [PATCH v2 1/2] mm: memcg: refactor page state unit helpers |
| |
On Tue, Oct 3, 2023 at 11:11 AM Michal Koutný <mkoutny@suse.com> wrote: > > On Fri, Sep 22, 2023 at 05:57:39PM +0000, Yosry Ahmed <yosryahmed@google.com> wrote: > > memcg_page_state_unit() is currently used to identify the unit of a > > memcg state item so that all stats in memory.stat are in bytes. However, > > it lies about the units of WORKINGSET_* stats. These stats actually > > represent pages, but we present them to userspace as a scalar number of > > events. In retrospect, maybe those stats should have been memcg "events" > > rather than memcg "state". > > Why isn't it possible to move WORKINGSET_* stats under the events now? > (Instead of using internal and external units.)
Those constants are shared with code outside of memcg, namely enum node_stat_item and enum vm_event_item, and IIUC they are used differently outside of memcg. Did I miss something?
> > Thanks, > Michal
| |