On Wed, Mar 11, 2020 at 12:44:39PM +0900, Jaewon Kim wrote: > Provide APIs to drivers so that they can show its memory usage on > /proc/meminfo. > > int register_extra_meminfo(atomic_long_t *val, int shift, > const char *name); > int unregister_extra_meminfo(atomic_long_t *val); > + show_val_kb(m, memtemp->name_pad, nr_page); I have 3 issues. Can this be printed without "KB" piece and without useless whitespace, like /proc/vmstat does? I don't know how do you parse /proc/meminfo. Do you search for specific string or do you use some kind of map[k] = v interface? 2) zsmalloc can create top-level symlink and resolve it to necessary value. It will be only 1 readlink(2) system call to fetch it. 3) android can do the same For simple values there is no need to register stuff and create mini subsystems. /proc/alexey