From owner-freebsd-bugs@FreeBSD.ORG Thu Apr 1 13:10:15 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DC9210656BE for ; Thu, 1 Apr 2010 13:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AF0CB8FC0C for ; Thu, 1 Apr 2010 13:10:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o31DAEpi000128 for ; Thu, 1 Apr 2010 13:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o31DAEHT000127; Thu, 1 Apr 2010 13:10:14 GMT (envelope-from gnats) Date: Thu, 1 Apr 2010 13:10:14 GMT Message-Id: <201004011310.o31DAEHT000127@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: John Baldwin Cc: Subject: Re: kern/117954: [ufs] dirhash on very large directories blocks the machine for tens of seconds X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 13:10:15 -0000 The following reply was made to PR kern/117954; it has been noted by GNATS. From: John Baldwin 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