Special schedulers, one CPU only kernel, one only userland
From: Andre Oppermann (andre_at_freebsd.org)
Date: 08/10/05
- Previous message: Bruce Evans: "Re: [RFC] -Wredundant-decls: keep it or remove it?"
- Next in thread: Robert Watson: "Re: Special schedulers, one CPU only kernel, one only userland"
- Reply: Robert Watson: "Re: Special schedulers, one CPU only kernel, one only userland"
- Reply: John Baldwin: "Re: Special schedulers, one CPU only kernel, one only userland"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 10 Aug 2005 14:02:58 +0200 To: arch@freebsd.org
When using FreeBSD as a high performance router there are some desirable
changes to the way multiple CPUs are handled. Normally a second CPU doesn't
add much (if any) performance to routing because of locking overhead and
packets randomly being processed by the CPUs wasting cache efficiency.
On the other hand having just one CPU is not optimal in running the routing
daemon in userland. When there are large changes to the table (eg. BGP
full feed flap) userland sucks time away from the packet forwarding in
the kernel.
The idea is to combine both worlds by designating CPU0 exclusively for
all kernel processing (thus avoiding the expensive mutex synchronization
and bus locking instructions) and CPU1 exclusively for all userland
processing. Whenever a userland program does a syscall the kernel CPU
will take over. When it's done, the process get run by the userland
CPU again. That way we get a very good scalability out of two CPUs for
this particular task.
Hence my question to the SMP and scheduler gurus: How well does the current
SMP and scheduler architecture lend itself to this kind of special handling?
Is it just a matter of modifying (or plugging in) the schedule or are there
more involved things to consider?
-- Andre _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Bruce Evans: "Re: [RFC] -Wredundant-decls: keep it or remove it?"
- Next in thread: Robert Watson: "Re: Special schedulers, one CPU only kernel, one only userland"
- Reply: Robert Watson: "Re: Special schedulers, one CPU only kernel, one only userland"
- Reply: John Baldwin: "Re: Special schedulers, one CPU only kernel, one only userland"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)
... if there are multiple integer needs to be updated by kernel, ... userland
maybe gets an inconsistent result, ... whatever) refers to the current CPU - the page is
either being updated ... (freebsd-current) - Re: Special schedulers, one CPU only kernel, one only userland
... Normally a second CPU ... > the routing daemon in userland. ...
> forwarding in the kernel. ... > Hence my question to the SMP and scheduler
gurus: ... (freebsd-arch) - Re: [PATCH] hwpmc(4) changes to use mp_maxid instead of mp_ncpus.
... jhb> CPU_ABSENT(cpu) and claim the CPU is disabled if it is absent, ... FreeBSD,
and b) for companies that use FreeBSD and devote resources ... All the sparse CPU stuff
actually dates back to 5.0 and was there to ... How will userland and in-kernel modules
find out which CPUs are ... (freebsd-arch) - ppc/ppc64 and x86 vsyscalls
... I've seen the various debates regarding the x86 vsyscalls. ... The idea is that
the kernel already has the necessary infrastructure ... based on which CPU we are
running on. ... at all) and possibly a userland implementation of gettimeofday. ...
(Linux-Kernel) - Re: Special schedulers, one CPU only kernel, one only userland
... Normally a second CPU ... > running the routing daemon in userland.
... > Hence my question to the SMP and scheduler gurus: ... storage for the duration,
requiring no synchronization. ... (freebsd-arch)