From: Willy Tarreau Date: Wed, 5 May 2021 14:28:31 +0000 (+0200) Subject: CLEANUP: activity: mark the profiling and task_profiling_mask __read_mostly X-Git-Tag: v2.4-dev19~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef7380f91646f0e7d11fe170545374fdf2575990;p=thirdparty%2Fhaproxy.git CLEANUP: activity: mark the profiling and task_profiling_mask __read_mostly These ones are only read by the scheduler and occasionally written to by the CLI parser, so let's move them to read_mostly so that they do not risk to suffer from cache line pollution. --- diff --git a/src/activity.c b/src/activity.c index 764613ffc1..8ccff234bf 100644 --- a/src/activity.c +++ b/src/activity.c @@ -21,8 +21,8 @@ /* bit field of profiling options. Beware, may be modified at runtime! */ -unsigned int profiling = HA_PROF_TASKS_AOFF; -unsigned long task_profiling_mask = 0; +unsigned int profiling __read_mostly = HA_PROF_TASKS_AOFF; +unsigned long task_profiling_mask __read_mostly = 0; /* One struct per thread containing all collected measurements */ struct activity activity[MAX_THREADS] __attribute__((aligned(64))) = { };