analysis of snapshot-related system deadlock
Don Lewis
truckman at FreeBSD.org
Wed Sep 28 00:26:41 PDT 2005
On 27 Sep, Don Lewis wrote:
> Probably the easiest fix would be to call runningbufwakeup() from
> ffs_copyonwrite() before grabbing "snaplk", and increase runningbufspace
> again before returning from ffs_copyonwrite(). The bufs waiting for
> "snaplk" aren't yet async writes currently running, to borrow from the
> comment on waitrunningbufspace().
Sleeping on "wdrain" is probably also undesirable if a thread holds
"snaplk" because of the potential impact on the activity of other
threads. A possible fix would be for bufwrite() to skip the call to
waitrunningbufspace() if the thread holds "snaplk". This might cause
problems with queuing an excessive amount of I/O, but I don't think so
because the outer bufwrite() will still call waitrunningbufspace().
More information about the freebsd-current
mailing list