Message ID | 20240925223023.735947-1-namhyung@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | bpf: Add slab iterator and kfunc (v1) | expand |
On Wed, Sep 25, 2024 at 03:30:20PM -0700, Namhyung Kim wrote: > Hello, > > I'm proposing a new iterator and a kfunc for the slab memory allocator > to get information of each kmem_cache like in /proc/slabinfo or > /sys/kernel/slab. Hello, Namhyung! I personally like the idea very much. With a growing number of kmem_caches /proc/slabinfo getting close to it's limit, so having a more flexible interface makes a lot of sense. > Maybe I need to call it kmem_cache iter but slab > was short and easier to call. :) I'd personally prefer kmem_cache or slab_cache, just in case somebody later would propose an iterator over individual slab objects within a kmem_cache. Acked-by: Roman Gushchin <roman.gushchin@linux.dev> (mm/*) Thanks!
On Thu, Sep 26, 2024 at 12:16:15AM +0000, Roman Gushchin wrote: > On Wed, Sep 25, 2024 at 03:30:20PM -0700, Namhyung Kim wrote: > > Hello, > > > > I'm proposing a new iterator and a kfunc for the slab memory allocator > > to get information of each kmem_cache like in /proc/slabinfo or > > /sys/kernel/slab. > > Hello, Namhyung! Hello Roman! > > I personally like the idea very much. With a growing number of kmem_caches > /proc/slabinfo getting close to it's limit, so having a more flexible > interface makes a lot of sense. > > > Maybe I need to call it kmem_cache iter but slab > > was short and easier to call. :) > > I'd personally prefer kmem_cache or slab_cache, just in case somebody later > would propose an iterator over individual slab objects within a kmem_cache. I think we can add a parameter to limit or extend the functionality like task iter and cgroup iter. But I'm not sure we need to use a different name for that. Anyway I'm ok to rename it kmem_cache iter. > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev> (mm/*) Thanks for your review! Namhyung
On 9/26/24 02:16, Roman Gushchin wrote: > On Wed, Sep 25, 2024 at 03:30:20PM -0700, Namhyung Kim wrote: >> Hello, >> >> I'm proposing a new iterator and a kfunc for the slab memory allocator >> to get information of each kmem_cache like in /proc/slabinfo or >> /sys/kernel/slab. > > Hello, Namhyung! > > I personally like the idea very much. With a growing number of kmem_caches > /proc/slabinfo getting close to it's limit, so having a more flexible > interface makes a lot of sense. > >> Maybe I need to call it kmem_cache iter but slab >> was short and easier to call. :) > > I'd personally prefer kmem_cache or slab_cache, just in case somebody later > would propose an iterator over individual slab objects within a kmem_cache. Yeah it would be better. Even though I doubt an iterator of slabs or objects would be really feasible. > Acked-by: Roman Gushchin <roman.gushchin@linux.dev> (mm/*) Acked-by: Vlastimil Babka <vbabka@suse.cz> #mm/slab > > Thanks!