summaryrefslogtreecommitdiffstats
path: root/python/examples
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-03-21 17:53:26 +0100
committerJeremy Allison <jra@samba.org>2014-03-27 06:06:11 +0100
commit84aa2ddd861549d6ec8d1ef15f4fd518e03f449b (patch)
treedc1137ef85e9d3c09416c30d38aafbb79b0a1d84 /python/examples
parent17a60b98db92026ae0b7136a9c8b802bf936423a (diff)
downloadsamba-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