lkml.org 
[lkml]   [2012]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] sl[au]b: process slabinfo_show in common code
On Thu, 27 Sep 2012, Glauber Costa wrote:

> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -239,7 +239,23 @@ static void s_stop(struct seq_file *m, void *p)
>
> static int s_show(struct seq_file *m, void *p)
> {
> - return slabinfo_show(m, p);
> + struct kmem_cache *s = list_entry(p, struct kmem_cache, list);
> + struct slabinfo sinfo;
> +
> + memset(&sinfo, 0, sizeof(sinfo));
> + get_slabinfo(s, &sinfo);

Could get_slabinfo() also set the objects per slab etc in some additional
field in struct slabinfo? Then we can avoid the exporting of the oo_
functions and we do not need the cache_order() etc functions.



\
 
 \ /
  Last update: 2012-09-27 18:01    [W:0.105 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site