diff options
| author | Volker Lendecke <vl@samba.org> | 2014-03-21 17:53:26 +0100 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2014-03-27 06:06:11 +0100 |
| commit | 84aa2ddd861549d6ec8d1ef15f4fd518e03f449b (patch) | |
| tree | dc1137ef85e9d3c09416c30d38aafbb79b0a1d84 /python/examples | |
| parent | 17a60b98db92026ae0b7136a9c8b802bf936423a (diff) | |
| download | samba-84aa2ddd861549d6ec8d1ef15f4fd518e03f449b.tar.gz samba-84aa2ddd861549d6ec8d1ef15f4fd518e03f449b.tar.xz samba-84aa2ddd861549d6ec8d1ef15f4fd518e03f449b.zip | |
pthreadpool: Avoid a malloc/free per job
pthreadpool_add_job is in our hottest code path for r/w intensive workloads, so
we should avoid anything CPU-intensive. pthreadpool used to malloc each job and
free it in the worker thread. This patch adds a FIFO queue for jobs that helper
threads copy from, avoiding constant malloc/free. This cuts user space
CPU in the local-bench-pthreadpool benchmark by roughly 10% on my system.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'python/examples')
0 files changed, 0 insertions, 0 deletions
