Date: Sat, 14 Jul 2001 16:00:50 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Alfred Perlstein <bright@sneakerz.org> Cc: audit@FreeBSD.ORG, smp@FreeBSD.ORG, Matthew Jacob <mjacob@feral.com> Subject: Re: planned change to mbinit code and minor changes to mp startu Message-ID: <XFMail.010714160050.jhb@FreeBSD.org> In-Reply-To: <20010714165911.B15299@sneakerz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14-Jul-01 Alfred Perlstein wrote: > * Matthew Jacob <mjacob@feral.com> [010714 13:26] wrote: >> =================================================================== >> RCS file: /home/ncvs/src/sys/kern/subr_mbuf.c,v >> retrieving revision 1.2 >> diff -u -r1.2 subr_mbuf.c >> --- kern/subr_mbuf.c 2001/06/22 16:03:23 1.2 >> +++ kern/subr_mbuf.c 2001/07/14 18:14:30 >> @@ -57,12 +62,11 @@ >> #endif >> >> /* >> - * SMP and non-SMP kernels clearly have a different number of possible >> cpus. >> */ >> #ifdef SMP >> -#define NCPU_PRESENT mp_ncpus >> +#define CPU_ABSENT(x) ((all_cpus & (1 << x)) == 0) >> #else >> -#define NCPU_PRESENT 1 >> +#define CPU_ABSENT(x) 0 >> #endif >> >> /* > > This should be in some file where other "per cpu" systems can get at it, > duplicating it everywhere is gross. (for instance, my cpu affinity > patches). Agreed. sys/pcpu.h is one possibility. > Also, since it looks like this would break if we suddently started > up another CPU I really don't agree with not populating the pools > if 'CPU_ABSENT(i)'. Well, I think what we will want in that case is to have the equivalent of cpu attach/detach routines that also have a list of handlers that other subsystems can register to be called when a CPU is added/removed. For example, the mbuf system would add handlers to allocate and teardown the per-CPU counters. > -Alfred -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010714160050.jhb>