hi,

> YAMAMOTO Takashi <y...@mwd.biglobe.ne.jp> wrote:
> 
>> > This avoids deadlocks in the following situations:
>> > 1) when memory is low: ioflush waits the fileystem, the fielsystem waits
>> >    for memory 
>> can you explain how it is a problem?
> 
> As I understand, one way to free memory is to flush vnode backed pages
> to the backend storage. If ioflush calls VOP_FSYNC on a memory-starved
> userland filesystem, it will get stuck until the filesystem gets memory
> again, and while it is stuck, it does not help freeing memory.

as i told you a few times, ioflush is not a thread to free memory.
pagedaemon is.  please read ufs_bmaparray and grep "uvm.pagedaemon_lwp"
in src/sys/kern/ to see what other filesystems do.  i don't think this
approach works for puffs because it's almost impossible to say in which
cases an operation needs memory allocation to complete, though.

YAMAMOTO Takashi

> 
> -- 
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> m...@netbsd.org

Reply via email to