From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 20:08:59 2010 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 BC13F106567A for ; Fri, 20 Aug 2010 20:08:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 898108FC18 for ; Fri, 20 Aug 2010 20:08:59 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2DEC746B65; Fri, 20 Aug 2010 16:08:59 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 833CD8A04E; Fri, 20 Aug 2010 16:08:58 -0400 (EDT) From: John Baldwin To: Kostik Belousov Date: Fri, 20 Aug 2010 16:08:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201008201535.48560.jhb@freebsd.org> <20100820194227.GO2396@deviant.kiev.zoral.com.ua> In-Reply-To: <20100820194227.GO2396@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201008201608.12421.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 20 Aug 2010 16:08:58 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: pluknet , FreeBSD Current Subject: Re: LOR on nfs: vfs_vnops.c:301 kern_descrip.c:1580 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: Fri, 20 Aug 2010 20:08:59 -0000 On Friday, August 20, 2010 3:42:27 pm Kostik Belousov wrote: > On Fri, Aug 20, 2010 at 03:35:48PM -0400, John Baldwin wrote: > > On Friday, August 20, 2010 3:19:53 pm Kostik Belousov wrote: > > > It seems nobody replied to the mdf@ objection against wait of the > > > new proc startup being equivalent to the LOR. I think that the wait > > > is safe, because the task is executed in the context of > > > the different process then the enqueue request. > > > This might be worth noting in the comment or commit message. > > > > I do wonder if we could get away with not waiting at all and always return -1? > > You could have the task handler actually finish the toggle of the tristate in > > the array. Potentially you could even dispense with the linked list of > > malloc'd structures and just walk the array creating processes for any entries > > in the "in-progress" state in the task handler. You might also want to avoid > > submitting entries for new threads if there is already a pending one? If that > > is the case it could be further simplified by having the task always create a > > single kthread when scheduled and just scheduling the task anytime a request > > needs one. > I think this is not that easy. Please take a look at nfs_asyncio(). > There is a lot of logic what to do in case an nfsiod thread was found > or not etc. Gah, the real problem is that unless the new kproc starts up super fast we would invariably return EIO causing the I/O to be performed synchronously more often. Given that, I think pluknet's patch is fine once it is updated for the module unload case. -- John Baldwin