From owner-freebsd-current@FreeBSD.ORG Mon May 18 17:35:25 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 7A0F2106566B for ; Mon, 18 May 2009 17:35:25 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id F21798FC08 for ; Mon, 18 May 2009 17:35:24 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz9 with SMTP id 9so3339577bwz.43 for ; Mon, 18 May 2009 10:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=PYfZ/UALqdApvUkTH4nWzOtq9DW8wtFqdabzQDGcRVI=; b=n8IZd2afQewwmNmlnsvmakjGUbgB7Qeum7p97WsTw4DAp/isIUtYF8Spbo2mZVUehN 20bzSO0/f0zQuVfZmzvXi4YaiqtEbziBm1O4vE5stzHQfFokQ+QJUR927n7+zGLNYNd3 dLCCOlB65yJM/CrDm2xQAJs46YVc2mM8qJyfY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=iBZrE6CB+0jkPPXCgXlx/1h+0R65zsFI7vr+dGAaSiEsoxaBh8jDFVA1X/Ttq3Ovz8 S6XADCaVeIuNSX0HJdn59iZQayQMuEn5v/xn9j4E1fYwqhuyqOcJhsNzO+yuduAe0deF eq+1D39WzfIIT7qC+TdEk9vrumEJk77yYzUTM= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.122.15 with SMTP id j15mr4525266far.10.1242666779855; Mon, 18 May 2009 10:12:59 -0700 (PDT) In-Reply-To: <200905181129.51526.jhb@freebsd.org> 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> Date: Mon, 18 May 2009 19:12:59 +0200 X-Google-Sender-Auth: 8a0e94ef28d1601d Message-ID: <3bbf2fe10905181012t4bde260bp31181e3ea7b03a42@mail.gmail.com> From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Adam McDougall , freebsd-current@freebsd.org, Artem Belevich , Ben Kelly 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: Mon, 18 May 2009 17:35:25 -0000 2009/5/18 John Baldwin : > On Saturday 16 May 2009 12:40:44 pm Ben Kelly wrote: >> =C2=A0 =C2=A01) It changes the kproc(9) API by adding a kproc_create_pri= ority() >> function that allows you to set the priority of the newly created >> thread. =C2=A0I'm not sure how people feel about this. > > Actually, I almost think we should just add a priority argument to each o= f the > routines that creates a new kthread/kproc. =C2=A0Perhaps allow a priority= of 0 to > let the thread run with the default priority. =C2=A0Hmm, it looks like kt= hreads > default to running with whatever thread0 runs at (PVM) which is probably = not > really ideal. =C2=A0Having an explicit priority for every kthread would p= robably > be best. =C2=A0Most kthreads should probably be at PZERO by default I thi= nk. I'm not sure I agree here. 1) Maybe I missed it (so please point me to the right one) but I didn't see a deep analysis of what messed up with the priorities there 2) I think this KPI can be dangerous and lead to problems. Priority is something highly fragile. Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein