tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd-5 deadlocks when memory is low



hi,

> YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost> wrote:
> 
>> the pagedaemon stays sleeping because there's already enough paging
>> requests in-progress.  (see "paging=" in the ddb show uvm output.)
>> it (reasonably) assumes i/o will complete "soon".
> 
> The offending code would be

yes.

> 
> void  
> uvm_kick_pdaemon(void)
> {
>  
>         KASSERT(mutex_owned(&uvm_fpageqlock));  
>   
>         if (uvmexp.free + uvmexp.paging < uvmexp.freemin ||
>             (uvmexp.free + uvmexp.paging < uvmexp.freetarg &&
>              uvmpdpol_needsscan_p())) {
>                 wakeup(&uvm.pagedaemon);
>         }
> }
> 
> My uvm stats gives me this, and indeed nothing wakes up pagedaemon:
> uvmexp.free = 1
> uvmexp.paging = 907
> uvmexp.freemin = 256
> uvmexp.freetarg = 341
> 
> But I would expect paging requests to complete one day, why would thet
> remain in progress forever?

because those requests have ended up in your file server which is
waiting for page daemon and thus deadlock?  just a wild guess, though.

YAMAMOTO Takashi

> 
> -- 
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index