lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/5] sched, timer: Remove usages of ACCESS_ONCE in the scheduler
On Wed, 29 Apr 2015 13:05:55 -0400
Waiman Long <waiman.long@hp.com> wrote:

> > goto no_join;
> > @@ -2107,7 +2107,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
> >
> > static void reset_ptenuma_scan(struct task_struct *p)
> > {
> > - ACCESS_ONCE(p->mm->numa_scan_seq)++;
> > + WRITE_ONCE(p->mm->numa_scan_seq, READ_ONCE(p->mm->numa_scan_seq) + 1);
> > p->mm->numa_scan_offset = 0;
> > }
> >
> >
>
> Generally, I am for replacing ACCESS_ONCE() with the more descriptive
> READ_ONCE() and WRITE_ONCE() except the above case where it makes the
> code harder to read without any real advantage.
>
> Other than that,
>
> Acked-by: Waiman Long <Waiman.Long@hp.com>
>

I agree, but I believe this code needs to be updated anyway. Making it
uglier may encourage that to happen.

-- Steve


\
 
 \ /
  Last update: 2015-04-29 19:41    [W:0.089 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site