From owner-freebsd-current@FreeBSD.ORG Mon Nov 29 22:02:05 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 E7DEB106566C; Mon, 29 Nov 2010 22:02:05 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 43C948FC1B; Mon, 29 Nov 2010 22:02:05 +0000 (UTC) Received: by eyb7 with SMTP id 7so2456809eyb.13 for ; Mon, 29 Nov 2010 14:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=rvKGC1VM+E/fVhoDXVWyY+Z5bCebrFgxEWxo+5AMVkM=; b=B7X6GmpbqwOnjeFfus+lE5g7SFy8AL09hWl9kJdijWcuaCIFahCW7kuAFfjxJZThVg mYM/XDKZWW9ddWjCnpZreKAT7oVSj9z9FG2cMMyPhgtUwh/zDsZ379CRGxS6kll2+s6b v3Ao0xD609zg/TxjxH4jRzZocITZgpd/720k8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=ZfmXEVkUUZyaHnyPLZBCqc0K6GNlVfnrdCbK3sSxVpt01grBRuqvsSjLJONx3SlHeI Cfk/7YO7aQa6GrlXZmckC/EAxHtvSImX63CyaESccwivc9RF/22Hf/TrXyZZqScP46RJ 7tHjkTZBkNky7828YXw5LDgNjFCrfNcSgh6J0= Received: by 10.223.100.9 with SMTP id w9mr6006484fan.12.1291068124297; Mon, 29 Nov 2010 14:02:04 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id n6sm1409879faa.28.2010.11.29.14.02.01 (version=SSLv3 cipher=RC4-MD5); Mon, 29 Nov 2010 14:02:02 -0800 (PST) Sender: Alexander Motin Message-ID: <4CF422D0.7050702@FreeBSD.org> Date: Tue, 30 Nov 2010 00:01:52 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101104 Thunderbird/3.1.6 MIME-Version: 1.0 To: Giovanni Trematerra References: <201011291007.37044.jhb@freebsd.org> <4CF3E68C.4050300@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , David Rhodus , freebsd-current@freebsd.org Subject: Re: panic: sched_priority: invalid priority 2906: nice 0, ticks 122865664 ftick 516947 ltick 517947 tick pri 2726 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: Mon, 29 Nov 2010 22:02:06 -0000 On 29.11.2010 23:47, Giovanni Trematerra wrote: > I got it on QEMU and assumed that QEMU was not doing a proper job of > distributing run-time amongst cores (so VirtualBox???). > I figured out that sched_tick is being passed a huge number of ticks elapsed > for the cpu at startup, in my case, by hardclock_anycpu (kern_clock.c). Problem with many ticks at CPU startup should be fixed by r214987. > I haven't a patch only a dirty hack just to make sure we won't be > running for more than 5s solid, if we have a huge number of ticks in > input to sched_tick, which is something that ULE can still handle. > > Hope this helps. > > diff -r d16464301129 sys/kern/kern_clock.c > --- a/sys/kern/kern_clock.c Thu Sep 23 11:56:35 2010 -0400 > +++ b/sys/kern/kern_clock.c Sun Oct 03 17:53:39 2010 -0400 > @@ -525,7 +525,7 @@ hardclock_anycpu(int cnt, int usermode) > PROC_SUNLOCK(p); > } > thread_lock(td); > - sched_tick(cnt); > + sched_tick((cnt< (hz*10)/2) ? cnt : (hz*10)/2); > td->td_flags |= flags; > thread_unlock(td); > > -- > Giovanni Trematerra -- Alexander Motin