Re: [patch] slub: provide /proc/slabinfo
From: Arjan van de Ven
Date: Fri Jan 04 2008 - 19:32:21 EST
On Tue, 1 Jan 2008 17:23:28 +0100
Ingo Molnar <mingo@xxxxxxx> wrote:
>
> * Theodore Tso <tytso@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/