mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: threads: mark all_threads_mask as read_mostly
This variable almost never changes and is read a lot in time-critical sections. threads_want_rdv_mask is read very often as well in thread_harmless_end() and is almost never changed (only when someone uses thread_isolate()). Let's move both to read_mostly.
This commit is contained in:
parent
ff88270ef9
commit
56c3b8b4e8
1 changed files with 2 additions and 2 deletions
|
|
@ -34,10 +34,10 @@ THREAD_LOCAL struct thread_info *ti = &ha_thread_info[0];
|
|||
|
||||
#ifdef USE_THREAD
|
||||
|
||||
volatile unsigned long threads_want_rdv_mask = 0;
|
||||
volatile unsigned long threads_want_rdv_mask __read_mostly = 0;
|
||||
volatile unsigned long threads_harmless_mask = 0;
|
||||
volatile unsigned long threads_sync_mask = 0;
|
||||
volatile unsigned long all_threads_mask = 1; // nbthread 1 assumed by default
|
||||
volatile unsigned long all_threads_mask __read_mostly = 1; // nbthread 1 assumed by default
|
||||
THREAD_LOCAL unsigned int tid = 0;
|
||||
THREAD_LOCAL unsigned long tid_bit = (1UL << 0);
|
||||
int thread_cpus_enabled_at_boot = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue