tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch/sparc64/sparc64
On Wed, Mar 26, 2008 at 07:51:41PM +0900, Joerg Sonnenberger wrote:
> On Tue, Mar 25, 2008 at 10:24:06AM -0700, Matt Thomas wrote:
> > Maybe even a uint64_t *cpu_counters in cpu_data. then evcnt cold allocate
> > a slow in it for each counter. IP could alloc N counters for ipstats.
>
> Yeah. What about something like:
> size_t reserve_cpucounter(const char *id)
>
> which returns the offset and making sure that the modification can't be
> preempted? The reservation can then extend the array if necessary (on
> all CPUs via crosscall).
We already have that:
http://nxr.netbsd.org/source/xref/sys/kern/subr_percpu.c
One problem is using it during early boot and perhaps from assembly code.
Maybe we could find a way to improve it so that's possible.
Andrew
Home |
Main Index |
Thread Index |
Old Index