From owner-freebsd-current@FreeBSD.ORG Wed Aug 18 19:17:58 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 044A31065694; Wed, 18 Aug 2010 19:17:58 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 95A278FC19; Wed, 18 Aug 2010 19:17:57 +0000 (UTC) Received: by qyk8 with SMTP id 8so371594qyk.13 for ; Wed, 18 Aug 2010 12:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AQ1wWHZPZ0MlaVGAEp5nvCZtycAokklS3GoA+Mv8Os0=; b=LD1mW3cpLuYcC1X1JczAacfa5NuIaNXP9lDQguGh1peZvYFtHP4MTJ1IfVqbsFOSHk Xxnq18CNWhDXHypuK3VF8IlnH8y2uISnSp03PZITkI/JtF9+1akIV0BGil4BWYntkDM5 CCS1gcS2SEcLW3U0/r2ScS3ifIVX+dEL6oOZc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=k9mJDY1T/FTp+qh9nvYBO9XoTWsqsBkC1YRM60uLWY5xNgXDTycCablnf6qQ/NzkjC AwHkcV7LSX5L3foKeWXpyHJd0Myd3fkXCYZ5KLnFi0D0qCcot21Dwq4KWx+VwYbE1mmE AYwBS4095qwH+2KEToqUz+oMYJ6E+E4vdxA2g= MIME-Version: 1.0 Received: by 10.229.192.13 with SMTP id do13mr6365932qcb.30.1282159076807; Wed, 18 Aug 2010 12:17:56 -0700 (PDT) Received: by 10.229.31.12 with HTTP; Wed, 18 Aug 2010 12:17:56 -0700 (PDT) In-Reply-To: References: <20100816185456.GU2396@deviant.kiev.zoral.com.ua> <20100817160445.GO2396@deviant.kiev.zoral.com.ua> <20100818134623.GU2396@deviant.kiev.zoral.com.ua> Date: Wed, 18 Aug 2010 23:17:56 +0400 Message-ID: From: pluknet To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: 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: Wed, 18 Aug 2010 19:17:58 -0000 On 18 August 2010 23:11, pluknet wrote: > On 18 August 2010 17:46, Kostik Belousov wrote: >> On Wed, Aug 18, 2010 at 02:43:19PM +0400, pluknet wrote: >>> On 18 August 2010 12:07, pluknet wrote: >>> > On 17 August 2010 20:04, Kostik Belousov wrote: >>> > >>> >> >>> >> Also please take a note of the John' suggestion to use the taskqueue= . >>> > >>> > I decided to go this road. Thank you both. >>> > Now I do nfs buildkernel survive and prepare some benchmark results. >>> > >>> >>> So, I modified the patch to defer proc_create() with taskqueue(9). >>> Below is `time make -j5 buildkernel WITHOUT_MODULES=3Dyes` perf. evalua= tion. >>> Done on 4-way CPU on clean /usr/obj with /usr/src & /usr/obj both >>> nfs-mounted over 1Gbit LAN. >>> >>> clean old >>> 1137.985u 239.411s 7:42.15 298.0% =A0 =A0 =A0 6538+2133k 87+43388io 226= pf+0w >>> >>> clean new >>> 1134.755u 240.032s 7:41.25 298.0% =A0 =A0 =A0 6553+2133k 87+43367io 224= pf+0w >>> >>> Patch needs polishing, though it generally works. >>> Not sure if shep_chan (or whatever name it will get) needs locking. >> As I said yesterday, if several requests to create nfsiod coming one >> after another, you would loose all but the last. >> >> You should put the requests into the list, probably protected by >> nfs_iod_mtx. >> > > How about this patch? Still several things to ask. > 1) I used malloc instance w/ M_NOWAIT, since it's called with nfs_iod_mtx= held. > 2) Probably busy/done gymnastics is a wrong mess. Your help is appreciate= d. > 3) if (1) is fine, is it right to use fail: logic (i.e. set > NFSIOD_NOT_AVAILABLE) > on memory shortage? Not tested. > > There are debug printf() left intentionally to see how 3 contexts run und= er load > to each other. I attached these messages as well if that makes sense. > Ah, yes. Sorry, forgot about that. This is from last run: 1139.225u 239.873s 7:44.90 296.6% 6524+2130k 77+43153io 220pf+0w --=20 wbr, pluknet