Re: [patch] slub: provide /proc/slabinfo

Linus Torvalds
2008-01-05T00:50:42Z

On Fri, 4 Jan 2008, Arjan van de Ven wrote:
>
> 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.

No, you misunderstand how seq-files work.

The start/stop sequence is done only overone single kernel buffer
instance, not over the whole open/close (or even the copy to user space).

It's expressly designed so that you can hold locks (including spinlocks
etc), and will not do any blocking ops (well - your *callbacks* can you
blocking ops, but the seq_file stuff itself won't) between start/stop.

Linus