diff options
author | Volker Lendecke <vl@samba.org> | 2016-08-08 08:56:23 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-08-24 01:33:48 +0200 |
commit | 80cd6b75288583086c7855a6c37be868d5e2cfb7 (patch) | |
tree | 5f342a91a483390aa87265f0cd4e507aacc5dd5e /lib | |
parent | 110f9258ddf995a334280c42b98e6f15d4d947d8 (diff) | |
download | samba-80cd6b75288583086c7855a6c37be868d5e2cfb7.tar.gz |
tevent: reorder tevent_context for cache locality
No functionality change. This just looks better in objdump --disassemble :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tevent/tevent_internal.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h index 6b29547427c..f17ce940365 100644 --- a/lib/tevent/tevent_internal.h +++ b/lib/tevent/tevent_internal.h @@ -246,25 +246,32 @@ struct tevent_context { /* the specific events implementation */ const struct tevent_ops *ops; + /* + * The following three pointers are queried on every loop_once + * in the order in which they appear here. Not measured, but + * hopefully putting them at the top together with "ops" + * should make tevent a *bit* more cache-friendly than before. + */ + + /* list of signal events - used by common code */ + struct tevent_signal *signal_events; + + /* List of threaded job indicators */ + struct tevent_threaded_context *threaded_contexts; + + /* list of immediate events - used by common code */ + struct tevent_immediate *immediate_events; + /* list of fd events - used by common code */ struct tevent_fd *fd_events; /* list of timed events - used by common code */ struct tevent_timer *timer_events; - /* List of threaded job indicators */ - struct tevent_threaded_context *threaded_contexts; - /* List of scheduled immediates */ pthread_mutex_t scheduled_mutex; struct tevent_immediate *scheduled_immediates; - /* list of immediate events - used by common code */ - struct tevent_immediate *immediate_events; - - /* list of signal events - used by common code */ - struct tevent_signal *signal_events; - /* this is private for the events_ops implementation */ void *additional_data; |