Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Apr 2010 13:10:14 GMT
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/117954: [ufs] dirhash on very large directories blocks the machine for tens of seconds
Message-ID:  <201004011310.o31DAEHT000127@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/117954; it has been noted by GNATS.

From: John Baldwin <jhb@freebsd.org>
To: bug-followup@freebsd.org,
 martin@nowhere.com
Cc:  
Subject: Re: kern/117954: [ufs] dirhash on very large directories blocks the machine for tens of seconds
Date: Thu, 1 Apr 2010 09:01:57 -0400

 While the kernel scheduler will not preempt a thread in the kernel (e.g. 
 during a system call) if a timeslice expires, it will preempt that thread for 
 interrupts (assuming you have 'options PREEMPTION' enabled which has been on 
 by default in GENERIC for some time now on i386), thus the dirhash 
 calculations should not starve interrupts.  However, X is not an interrupt, so 
 while things like ping should still work, X will not get to run.
 
 While it would be tempting to defer the hashing of the directory contents to 
 an asynchronous task for large directories running in a thread with a low 
 priority, this might have bad side effects due to priority inversions related 
 to a very low priority thread holding various vnode locks.
 
 -- 
 John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004011310.o31DAEHT000127>