]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Under heavy IO load the buf daemon can run for many hundereds of
authorjeff <jeff@FreeBSD.org>
Wed, 8 Jun 2005 20:26:05 +0000 (20:26 +0000)
committerjeff <jeff@FreeBSD.org>
Wed, 8 Jun 2005 20:26:05 +0000 (20:26 +0000)
commitb53b83993cd241c7f77e329490bea901c692a0d0
tree034ba558fa12ca2f29352928ae4c587a7f247a1d
parent9178faa91c8d46d94a8d2affcc150bafc645864c
 - Under heavy IO load the buf daemon can run for many hundereds of
   milliseconds due to what is essentially n^2 algorithmic complexity.  This
   change makes the algorithm N*2 instead.  This heavy processing manifested
   itself as skipping in audio and video playback due to the long scheduling
   latencies and contention on giant by pcm.
 - flushbufqueues() is now responsible for flushing multiple buffers
   rather than one at a time.  This allows us to save our progress in the
   list by using a sentinal.  We must do the numdirtywakeup() and
   waitrunningbufspace() here now rather than in buf_daemon().
 - Also add a uio_yield() after we have processed the list once for bufs
   without deps and again for bufs with deps.  This is to release Giant
   and allow any other giant locked code to proceed.

Tested by: Many users on current@
Revealed by: schedgraph traces sent by Emil Mikulic & Anthony Ginepro
sys/kern/vfs_bio.c