lkml.org 
[lkml]   [2018]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] sched/numa: Reset scan rate whenever task moves across nodes
> > +#ifdef CONFIG_NUMA_BALANCING
> > + if (!p->mm || (p->flags & PF_EXITING))
> > + return;
> > +
> > + if (p->numa_faults) {
> > + int src_nid = cpu_to_node(task_cpu(p));
> > + int dst_nid = cpu_to_node(new_cpu);
> > +
> > + if (src_nid != dst_nid)
> > + p->numa_scan_period = task_scan_start(p);
> > + }
> > +#endif
>
> Please don't add #ifdeffery inside functions, especially not if they do weird flow control like
> a 'return' from the middle of a block.
>
> A properly named inline helper would work I suppose.
>

Okay, will take care.

\
 
 \ /
  Last update: 2018-09-12 17:21    [W:0.189 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site