NetBSD Problem Report #40505
From www@NetBSD.org Wed Jan 28 15:07:19 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id B1E5863C041
for <gnats-bugs@gnats.netbsd.org>; Wed, 28 Jan 2009 15:07:19 +0000 (UTC)
Message-Id: <20090128150719.845D363C040@narn.NetBSD.org>
Date: Wed, 28 Jan 2009 15:07:19 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: delay(9) is a MD non-interface
X-Send-Pr-Version: www-1.0
>Number: 40505
>Category: kern
>Synopsis: delay(9) is a MD non-interface
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jan 28 15:10:00 +0000 2009
>Last-Modified: Sat Jul 19 10:05:01 +0000 2014
>Originator: Antti Kantee
>Release:
>Organization:
interfaces r us
>Environment:
>Description:
delay and DELAY use various cpp tricks from port to port. There
should be only an MI interface definition.
>How-To-Repeat:
little reading
>Fix:
lot of writing
>Audit-Trail:
From: Masao Uebayashi <uebayasi@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/40505: delay(9) is a MD non-interface
Date: Sat, 19 Jul 2014 09:58:26 +0900
For sys/kern/subr_prf.c:vpanic(), whose DELAY() is "I have nothing to
do", it can be replaced with MI function cpu_idle(). Question is, how
to implement it in rump.
From: Antti Kantee <pooka@iki.fi>
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: kern/40505: delay(9) is a MD non-interface
Date: Sat, 19 Jul 2014 10:03:57 +0000
On 19/07/14 01:00, Masao Uebayashi wrote:
> For sys/kern/subr_prf.c:vpanic(), whose DELAY() is "I have nothing to
> do", it can be replaced with MI function cpu_idle(). Question is, how
> to implement it in rump.
cpu_idle() is not a MI function interface, from cpu.h:
#ifndef cpu_idle
void cpu_idle(void);
#endif
For that particular DELAY(), it might as well be "continue".
But to answer your question anyway: you can't meaningfully, rump kernels
do not schedule threads onto cores (they run on threads which schedule
cores), so "core is idle" does not make sense.
If you really have a strong use case for not spinning before reboot in
case >1 cores panic, from the rump kernel perspective it is best to
define a true interface, e.g. cpu_panicwait(), and call cpu_idle() in
the kern_cpu.c implementation and sleep in a rump kernel.
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.