[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: netbsd-5 deadlocks when memory is low
On Mon, Sep 05, 2011 at 07:37:08AM +0000, Emmanuel Dreyfus wrote:
> On Fri, Sep 02, 2011 at 06:54:55AM +0200, Emmanuel Dreyfus wrote:
> > A common case of deadlocks is ioflush waiting for the filesystem and the
> > filesystem waiting for memory.
> I made some progress in my understanding of the issue: the filesystem
> server (perfused) gets swaped out and this is why all attemps to sync
> PUFFS vnode deadlock.
> We need a way of avoiding that situation. A first idea would be that
> PUFFS could detect the filesystem server and tag it so that it does not
> get swapped, but that will not work with perfused, since it is just a
> relay to a FUSE filesystem server (here glusterfsd). The FUSE filesystem
> server needs to be unswappable as well.
> So it seems we need a way for a process to tell the kernel that it
> should not be swapped out. What about a sysctl proc.*.wired, accessible
> only by root and defaulting to 0?
You have mlock(2) for this. I think ntpd uses it, you can have a look here.
Of course you don't want to mlock a big process ...
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
Main Index |
Thread Index |