From owner-freebsd-current@FreeBSD.ORG Wed Oct 3 04:37:59 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 ADCFD16A421 for ; Wed, 3 Oct 2007 04:37:59 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id E572913C474 for ; Wed, 3 Oct 2007 04:37:58 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: by ug-out-1314.google.com with SMTP id a2so62891ugf for ; Tue, 02 Oct 2007 21:37:57 -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=VfRq36/zXVXY/8g3RBhmTO71obBHPH+eEQDx7NsU9uk=; b=Bl4aOkHJ/2SQSoU0ke4cd9NenP3QxcyE2eAD0G7vOEjisy4ZAfKbv/pF7KacHIP3WRM/s9IhAU8/fPQPvf3B/QDTUD6FcGflfByft2OeRmyZNtM88t1LRsc3tZ+QYaB2grw4c+w99yf7fX6ZgS9vpbzC5pFu+TomWEI/YOxZCTs= 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=jdxowErt2LF6NxumB675XeJvH1P+fnK9m7Whj7tb+q2y41gUrpYAI/cBikKttI6ljTESl839hNroc4WejM7G7iC2pT+u5qiugxELeT/RHmJ7mUMfLmgWg85SL2HI+UlYVO0vkGIZqqCx7AyvNtClNOwzg+oeSAtLjvbVyahkh40= Received: by 10.67.19.13 with SMTP id w13mr2013330ugi.1191386277183; Tue, 02 Oct 2007 21:37:57 -0700 (PDT) Received: from darklight.abyss ( [83.239.5.254]) by mx.google.com with ESMTPS id j3sm1229629ugd.2007.10.02.21.37.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2007 21:37:55 -0700 (PDT) Received: from darklight.abyss (localhost [127.0.0.1]) by darklight.abyss (8.14.1/8.14.1) with ESMTP id l934bTYi001187; Wed, 3 Oct 2007 08:37:29 +0400 (MSD) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by darklight.abyss (8.14.1/8.14.1/Submit) id l934bPaD001186; Wed, 3 Oct 2007 08:37:25 +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 08:37:24 +0400 From: Yuri Pankov To: Jeff Roberson Message-ID: <20071003043724.GA1113@darklight.abyss> References: <20071002165007.D587@10.0.0.1> <20071003005009.GA1103@darklight.abyss> <20071003012155.GA1327@darklight.abyss> <20071002195415.I615@10.0.0.1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071002195415.I615@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 04:37:59 -0000 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). TIA. >> >> It's UP amd64 with SCHED_ULE >> >> kernel config: >> >> include GENERIC >> ident DARKLIGHT >> >> nooptions SCHED_4BSD >> options SCHED_ULE >> >> -- >> Yuri Pankov >> -- Yuri Pankov