From owner-freebsd-current@FreeBSD.ORG Wed Oct 3 05:37:32 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2529316A417 for ; Wed, 3 Oct 2007 05:37:32 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id A42BA13C458 for ; Wed, 3 Oct 2007 05:37:31 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: by ug-out-1314.google.com with SMTP id a2so67443ugf for ; Tue, 02 Oct 2007 22:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:x-authentication-warning:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=+OVOmD6bPbfpZuOJEnC/WInlATPxUIN9sQGbjlOunJo=; b=V5i/sDslUOZH4xaqGWUkEJHS/kr6zMssbmqq9GIISlXcssZBPtPGMKIuJlALxHcGf+2u6SJNHsTbD9Czdb+jnIpBsz6UXdiAAUt5R9YBw9/2vShav4oguCABtO648poqIW5tt3mIY3rBZt9MzC7Jg66AEJnQgupFkcJgumRd4bs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:x-authentication-warning:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=Gnu2XGV5/Bl+IIvr03wq2YhPuG1G9SbnFOvo49fCOb7F1h6Jbx9mgCLcEaydi4MOZjyAlOkR1A5y/ErgusMbQmo0mobxcALXlAJ7L7u48v+bCGWWG78ouisvOfKSGDNp7YU4DT0aZzRoJ8HD7bJzAVhhsmsWMk4UgijC8rg7ONQ= Received: by 10.66.219.16 with SMTP id r16mr32103ugg.1191389850118; Tue, 02 Oct 2007 22:37:30 -0700 (PDT) Received: from darklight.abyss ( [83.239.5.254]) by mx.google.com with ESMTPS id 29sm1245345uga.2007.10.02.22.37.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2007 22:37:27 -0700 (PDT) Received: from darklight.abyss (localhost [127.0.0.1]) by darklight.abyss (8.14.1/8.14.1) with ESMTP id l935b33E001179; Wed, 3 Oct 2007 09:37:03 +0400 (MSD) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by darklight.abyss (8.14.1/8.14.1/Submit) id l935b2Bp001178; Wed, 3 Oct 2007 09:37:02 +0400 (MSD) (envelope-from yuri.pankov@gmail.com) X-Authentication-Warning: darklight.abyss: yuri set sender to yuri.pankov@gmail.com using -f Date: Wed, 3 Oct 2007 09:37:02 +0400 From: Yuri Pankov To: Jeff Roberson Message-ID: <20071003053702.GA1119@darklight.abyss> References: <20071002165007.D587@10.0.0.1> <20071003005009.GA1103@darklight.abyss> <20071003012155.GA1327@darklight.abyss> <20071002195415.I615@10.0.0.1> <20071003043724.GA1113@darklight.abyss> <20071002215228.Q615@10.0.0.1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071002215228.Q615@10.0.0.1> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: current@freebsd.org Subject: Re: ULE/yielding patch for testing. 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, 03 Oct 2007 05:37:32 -0000 On Tue, Oct 02, 2007 at 09:53:29PM -0700, Jeff Roberson wrote: > On Wed, 3 Oct 2007, Yuri Pankov wrote: > >> On Tue, Oct 02, 2007 at 07:55:02PM -0700, Jeff Roberson wrote: >>> On Wed, 3 Oct 2007, Yuri Pankov wrote: >>> >>>> On Wed, Oct 03, 2007 at 04:50:09AM +0400, Yuri Pankov wrote: >>>>> On Tue, Oct 02, 2007 at 04:53:33PM -0700, Jeff Roberson wrote: >>>>>> Enclosed is a patch that does two things: >>>>>> >>>>>> 1) Reduces UP context switch time by over 10% making it faster than >>>>>> 4BSD >>>>>> on UP. On SMP it's hard to compare since ULE can do as many as 30x as >>>>>> many >>>>>> switches per second on my 8way system. >>>>>> >>>>>> 2) Restores old sched_yield() behavior from 6.x. This was changed in >>>>>> -current unintentionally I think. >>>>>> >>>>>> I'd appreciate any extra testing. The ULE context switch time >>>>>> improvements >>>>>> required some changes to the frequency that we recalculate priorities. >>>>>> I'm >>>>>> mostly interested in hearing whether this causes any regression in >>>>>> normal >>>>>> workloads. >>>>>> >>>>>> Those of you still using 4BSD can also verify that the yield changes >>>>>> don't >>>>>> cause any problems there. >>>>>> >>>>>> Thanks, >>>>>> Jeff >>>>> >>>>> Jeff, >>>>> >>>>> Patch applied cleanly, though with new kernel I got a panic just after >>>>> boot - on xdm startup, I guess (crashdump wasn't saved), a lot of the >>>>> same messages >>>>> (copied by hand): >>>>> >>>>> cpuid = 0 >>>>> panic: _mtx_lock_sleep: recursed on non-recursive mutex >>>>> audit_mtx@/usr/src/sys/security/audit_worker.c:518 >>>>> >>>>> and after few seconds system just hangs. >>>>> >>>>> Any hints? >>>>> >>>>> -- >>>>> Yuri Pankov >>>> >>>> Sorry for being so verbose... >>> >>> Did you 'make depend' as well? If you patch -R < yield.diff does this >>> kernel work? I'm not sure how my changes could cause this type of bug. >>> >>> Thanks, >>> Jeff >>> >> >> I'm rebuilt kernel with and without your patch (with clean /usr/obj/ every >> time) >> using `make kernel KERNCONF=DARKLIGHT` just to be sure. >> >> Without your patch, system seems to run stable. With it - I get hard hangs >> upon >> just loading X or upon xdm startup or after xdm login, every time the >> same. No >> messages now, just hangs. Nothing suspicious in /var/log/messages, etc. >> >> Xorg 7.3 with xf86-video-nv, all ports built yesterday (it was fresh >> install). >> >> Anything that I should look at? (as it can be just pilot error). > > The attached diff is only the changes the fix yield() and sched_yield() to > pre-CURRENT states. Can you try this on its own and let me know if it > works so I can narrow down the part of the patch causing trouble? > > Thanks, > Jeff > Works fine so far (at least I'm able to login through xdm and run apps :-). Thanks Jeff. -- Yuri Pankov