lkml.org 
[lkml]   [2008]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] slub: provide /proc/slabinfo
On Tue, 1 Jan 2008 17:23:28 +0100
Ingo Molnar <mingo@elte.hu> wrote:

>
> * Theodore Tso <tytso@MIT.EDU> wrote:
>
> > [...] doesn't a patch to provide /proc/slabinfo for SLUB already
> > exist?
>
> yes, the complete (and tested) patch is below. It has been through a
> few thousand random-bootup tests on x86 32-bit and 64-bit so it's
> v2.6.24 material i think.


> +static void *s_start(struct seq_file *m, loff_t *pos)
> +{
> + loff_t n = *pos;
> +
> + down_read(&slub_lock);
> + if (!n)
> + print_slabinfo_header(m);
> +
> + return seq_list_start(&slab_caches, *pos);
> +}
> +


this is the part I'm not very thrilled about... at least on first sight
it looks like a user can now hold the read sem over system calls, and for as long as it wants.
Either that's no problem (but then we wouldn't need the lock in the first place) or it
is a problem that then wants to be fixed


\
 
 \ /
  Last update: 2008-01-05 01:35    [W:0.123 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site