MINOR: task: introduce a thread-local "sched" variable for local scheduler stuff

The aim is to rassemble all scheduler information related to the current
thread. It simply points to task_per_thread[tid] without having to perform
the operation at each time. We save around 1.2 kB of code on performance
sensitive paths and increase the request rate by almost 1%.
This commit is contained in:
Willy Tarreau
2019-09-24 08:25:15 +02:00
parent d66d75656e
commit d022e9c98b
5 changed files with 21 additions and 19 deletions

View File

@@ -77,7 +77,7 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid)
return;
chunk_appendf(buf, " curr_task=");
ha_task_dump(buf, curr_task, " ");
ha_task_dump(buf, sched->current, " ");
}