Messages in this thread | | | Date | Fri, 4 Jan 2008 16:27:05 -0800 | From | Arjan van de Ven <> | Subject | Re: [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
| |