Date: Wed, 18 Jul 2001 10:42:32 -0400 From: Bosko Milekic <bmilekic@technokratis.com> To: Matthew Jacob <mjacob@feral.com> Cc: smp@freebsd.org, audit@freebsd.org Subject: Re: planned change to mbinit code and minor changes to mp startup Message-ID: <20010718104232.A96785@technokratis.com> In-Reply-To: <Pine.BSF.4.21.0107141117110.87022-100000@beppo>; from mjacob@feral.com on Sat, Jul 14, 2001 at 11:25:46AM -0700 References: <Pine.BSF.4.21.0107130000220.61694-100000@beppo> <Pine.BSF.4.21.0107141117110.87022-100000@beppo>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Matthew, Thanks for looking into this. It is clearly a problem. The proposed solution is also good. However, it poses a problem when it comes to netstat(1) and systat(1). They both presently rely on mp_ncpus and fetch the PCPU stats treating the whole thing as a dense array. This isn't your fault (it's mine), and I'd ask for this patch to sit pending for a while until I get to cleaning up some of systat(1) and netstat(1) again (when I re-enable mbtypes stats). It's relatively high on the TODO and I should be there soon, so just bear with me as I re-settle in. On Sat, Jul 14, 2001 at 11:25:46AM -0700, Matthew Jacob wrote: > > Problem: the MB init and alloc code assumes that in the SMP case that there is > a dense array of CPU ids for the CPUs present and reported via mp_ncpus. [...] As for moving toward the (c) point you mention: I wonder how reasonable it would be to offer (a) hook(s) to subsystems which they can use to configure PCPU-specific intialization routines to be called when a processor is enabled during runtime. i.e.: time 1: CPU 1 off; CPU 2 off; CPU 3 on; CPU 4 on; time 2: CPU 1 off -> on; hook_for_cpu1(); CPU 2 off -> on; hook_for_cpu2(); CPU 3 on; CPU 4 on; The hook functions could include, amongst other things, the code to malloc() the necessary structures for the relevant per-CPU container. Cheers, -- Bosko Milekic bmilekic@technokratis.com 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?20010718104232.A96785>