Date: Fri, 20 Aug 2010 16:08:12 -0400 From: John Baldwin <jhb@freebsd.org> To: Kostik Belousov <kostikbel@gmail.com> Cc: pluknet <pluknet@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: LOR on nfs: vfs_vnops.c:301 kern_descrip.c:1580 Message-ID: <201008201608.12421.jhb@freebsd.org> In-Reply-To: <20100820194227.GO2396@deviant.kiev.zoral.com.ua> References: <AANLkTimJ=d06D2z24QyRQ98zEa1Pemk4=vkNGLNiX90N@mail.gmail.com> <201008201535.48560.jhb@freebsd.org> <20100820194227.GO2396@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008201608.12421.jhb>