pthreadpool: create a tevent_threaded_context per registered event context
authorRalph Boehme <slow@samba.org>
Sat, 11 Nov 2017 12:05:03 +0000 (13:05 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 17 Nov 2017 01:35:52 +0000 (02:35 +0100)
commit3b16bfe483da19c500ab511fd3d8c81528cfe608
tree9a2b17258d0e0f28c78cca8ec0c71a1c752c0125
parent6c0d053ec0ea54e4152878564c5d21dfae9f346b
pthreadpool: create a tevent_threaded_context per registered event context

We just need one tevent_threaded_context per unique combintation of
tevent event contexts and pthreadpool_tevent pools, not multiple copies
for identical combinations of a tevent contexts and a pthreadpool_tevent
pools.

With this commit we register tevent contexts in a list in the
pthreadpool_tevent structure and will only have one
tevent_threaded_context object per tevent context per pool.

With many pthreadpool_tevent_job_send reqs this pays off, I've seen a
small decrease in cpu-ticks with valgrind callgrind and a modified
local.messaging.ping-speed torture test. The test modification ensured
messages we never directly send, but always submitted via
pthreadpool_tevent_job_send.

Pair-Programmed-With: Jeremy Allison <jra@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Nov 17 02:35:52 CET 2017 on sn-devel-144
lib/pthreadpool/pthreadpool_tevent.c