Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Aug 1996 15:02:40 -0600
From:      Steve Passe <smp@csn.net>
To:        smp@freebsd.org
Cc:        hackers@freebsd.org
Subject:   halt & sysctl
Message-ID:  <199608032102.PAA14656@clem.systemsix.com>

next in thread | raw e-mail | index | archive | help
Hi,

I have observed that when halting SMP kernels the 'sync' never
finishes unless I manually disable the 2nd CPU via:

sysctl -w kern.smp_active=0

before issuing the halt command.  I have been looking for a way
to do the equivalent in machdep.c:boot():

boot(howto)
	int howto;
{
#ifdef SMP
/**
 * FIXME: all but the first CPU needs to be disabled here!!!
 *        we want to do equiv. of "sysctl -w kern.smp_active=0"
 */
       int status;
       int sctl[2];

	sctl[0] = CTL_KERN;
>>>    sctl[1] = ???;
       status = kernel_sysctl(&proc0, sctl, 2, 0, 0, 0, sizeof( int ), 0);
       printf( "\nsysctl status: %d\n", status );
#endif /* SMP */

	if (!cold && (howto & RB_NOSYNC) == 0 && waittime < 0) {
...
}

Am I barking up the right tree?
Anyone know the proper value for sctl[1]?

--
Steve Passe	| powered by
smp@csn.net	|            FreeBSD




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608032102.PAA14656>