]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: task: do not export rq_next anymore
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2019 14:10:55 +0000 (16:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Apr 2019 07:50:56 +0000 (09:50 +0200)
This one hasn't been used anymore since the scheduler changes after 1.8
but it kept being exported and maintained up to date while it's always
reset when scanning the trees. Let's stop exporting it and updating it.

include/proto/task.h
src/task.c

index 1f4b52e971ccb85fd6bd90367da985f03ee774a7..fdf4d6a648c4ee6491093d9d1c5a7ec7458383a8 100644 (file)
@@ -92,7 +92,6 @@ extern struct pool_head *pool_head_task;
 extern struct pool_head *pool_head_tasklet;
 extern struct pool_head *pool_head_notification;
 extern THREAD_LOCAL struct task *curr_task; /* task currently running or NULL */
-extern THREAD_LOCAL struct eb32sc_node *rq_next; /* Next task to be potentially run */
 #ifdef USE_THREAD
 extern struct eb_root timers;      /* sorted timers tree, global */
 extern struct eb_root rqueue;      /* tree constituting the run queue */
@@ -229,11 +228,8 @@ static inline struct task *task_unlink_rq(struct task *t)
 
        if (is_global)
                HA_SPIN_LOCK(TASK_RQ_LOCK, &rq_lock);
-       if (likely(task_in_rq(t))) {
-               if (&t->rq == rq_next)
-                       rq_next = eb32sc_next(rq_next, tid_bit);
+       if (likely(task_in_rq(t)))
                __task_unlink_rq(t);
-       }
        if (is_global)
                HA_SPIN_UNLOCK(TASK_RQ_LOCK, &rq_lock);
        return t;
index 9dddd89f7e42138289a1d4c9497a791a88d484ca..aa980485ba066251995cb3af09470ae4cedaa6c3 100644 (file)
@@ -42,7 +42,6 @@ unsigned int nb_tasks_cur = 0;     /* copy of the tasks count */
 unsigned int niced_tasks = 0;      /* number of niced tasks in the run queue */
 
 THREAD_LOCAL struct task *curr_task = NULL; /* task currently running or NULL */
-THREAD_LOCAL struct eb32sc_node *rq_next = NULL; /* Next task to be potentially run */
 
 __decl_aligned_spinlock(rq_lock); /* spin lock related to run queue */
 __decl_aligned_spinlock(wq_lock); /* spin lock related to wait queue */
@@ -317,6 +316,7 @@ int wake_expired_tasks()
  */
 void process_runnable_tasks()
 {
+       struct eb32sc_node *rq_next;
        struct task *t;
        int max_processed;