Date: Tue, 6 Jul 2004 16:14:26 -0400 (EDT) From: Andrew Gallatin <gallatin@cs.duke.edu> To: Julian Elischer <julian@elischer.org> Cc: freebsd-threads@freebsd.org Subject: Re: pthread switch (was Odd KSE panic) Message-ID: <16619.2082.399880.649617@grasshopper.cs.duke.edu> In-Reply-To: <Pine.BSF.4.21.0407061045280.64529-100000@InterJet.elischer.org> References: <16618.52660.343754.933037@grasshopper.cs.duke.edu> <Pine.BSF.4.21.0407061045280.64529-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer writes: > > > On Tue, 6 Jul 2004, Andrew Gallatin wrote: > > > > > FWIW, inserting a pthread_yield() just before the ioctl call in the > > worker thread speeds things up quite a bit (100us -> 73us) in > > combination with kern.threads.virtual_cpu=1. > > what about with kern.threads.virtual_cpu untouched? > and what about with the hlt sysctl? kern.threads.virtual_cpu=2 machdep.cpu_idle_hlt=1 no yeild 123.6us yeild 116.8us kern.threads.virtual_cpu=2 machdep.cpu_idle_hlt=0 no yield 111.9 yield 112.9 kern.threads.virtual_cpu=1 machdep.cpu_idle_hlt=1 no yeild 100.8 yeild 75.0 kern.threads.virtual_cpu=1 machdep.cpu_idle_hlt=0 no yield 93.9 ield 67.9 > does your worker thread loop to check if there is more work before > waiting to be notified? Yes. He takes a mutex, loops over all completed events, sending pthread_signals as required, then releases the mutex and sleeps via an ioctl. Drew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16619.2082.399880.649617>