From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 19:42:32 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 4228A106564A; Fri, 20 Aug 2010 19:42:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 90D548FC08; Fri, 20 Aug 2010 19:42:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o7KJgRDJ080760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Aug 2010 22:42:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o7KJgRtJ093572; Fri, 20 Aug 2010 22:42:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o7KJgRaT093571; Fri, 20 Aug 2010 22:42:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 20 Aug 2010 22:42:27 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20100820194227.GO2396@deviant.kiev.zoral.com.ua> References: <20100820191953.GN2396@deviant.kiev.zoral.com.ua> <201008201535.48560.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J58k4iUnqtw3lv0j" Content-Disposition: inline In-Reply-To: <201008201535.48560.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua 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 19:42:32 -0000 --J58k4iUnqtw3lv0j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > I do wonder if we could get away with not waiting at all and always retur= n -1? > You could have the task handler actually finish the toggle of the tristat= e 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 en= tries > in the "in-progress" state in the task handler. You might also want to a= void > 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 crea= te a > single kthread when scheduled and just scheduling the task anytime a requ= est > 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. --J58k4iUnqtw3lv0j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxu2qIACgkQC3+MBN1Mb4hzEgCgpzwzjn+luvtYc0FHy/CXTtnV KaEAoJRoPIv9a8wdCm5YuuTRxXrX4Vrz =XFvO -----END PGP SIGNATURE----- --J58k4iUnqtw3lv0j--