lkml.org 
[lkml]   [2019]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] task: Clean house now that tasks on the runqueue are rcu protected
On 09/02, Eric W. Biederman wrote:
>
> @@ -1644,7 +1644,7 @@ static void task_numa_compare(struct task_numa_env *env,
> return;
>
> rcu_read_lock();
> - cur = task_rcu_dereference(&dst_rq->curr);
> + cur = rcu_dereference(dst_rq->curr);
> if (cur && ((cur->flags & PF_EXITING) || is_idle_task(cur)))
> cur = NULL;

afaics rq->curr can't be NULL, so you can also simplify the "if" check

cur = task_rcu_dereference(&dst_rq->curr);
if ((cur->flags & PF_EXITING) || is_idle_task(cur))
cur = NULL;

Same for membarrier_global_expedited/membarrier_private_expedited changed
by this patch.

Oleg.

\
 
 \ /
  Last update: 2019-09-03 15:07    [W:0.233 / U:2.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site