From owner-freebsd-current@FreeBSD.ORG Tue May 19 02:16:51 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A11E106567E; Tue, 19 May 2009 02:16:51 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from mail.wanderview.com (mail.wanderview.com [66.92.166.102]) by mx1.freebsd.org (Postfix) with ESMTP id 904438FC0A; Tue, 19 May 2009 02:16:50 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from harkness.in.wanderview.com (harkness.in.wanderview.com [10.76.10.150]) (authenticated bits=0) by mail.wanderview.com (8.14.3/8.14.3) with ESMTP id n4J2GlK3018213 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 19 May 2009 02:16:47 GMT (envelope-from ben@wanderview.com) Message-Id: From: Ben Kelly To: John Baldwin In-Reply-To: <200905181129.51526.jhb@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Mon, 18 May 2009 22:16:46 -0400 References: <08D7DC2A-68BE-47B6-8D5D-5DE6B48F87E5@wanderview.com> <20090516031332.GG82547@egr.msu.edu> <5D988481-068A-4AB3-952E-255BEA1D9DA7@wanderview.com> <200905181129.51526.jhb@freebsd.org> X-Mailer: Apple Mail (2.935.3) X-Spam-Score: -1.44 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.64 on 10.76.20.1 Cc: Adam McDougall , freebsd-current@freebsd.org, Artem Belevich Subject: Re: [patch] zfs livelock and thread priorities X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 02:16:51 -0000 On May 18, 2009, at 11:29 AM, John Baldwin wrote: > On Saturday 16 May 2009 12:40:44 pm Ben Kelly wrote: >> 1) It changes the kproc(9) API by adding a kproc_create_priority() >> function that allows you to set the priority of the newly created >> thread. I'm not sure how people feel about this. > > Actually, I almost think we should just add a priority argument to > each of the > routines that creates a new kthread/kproc. Perhaps allow a priority > of 0 to > let the thread run with the default priority. Hmm, it looks like > kthreads > default to running with whatever thread0 runs at (PVM) which is > probably not > really ideal. Having an explicit priority for every kthread would > probably > be best. Most kthreads should probably be at PZERO by default I > think. If this approach was taken would it make sense to use a flag to indicate "use the specified priority" since 0 is a valid priority value? Thanks. - Ben