Messages in this thread | | | Date | Wed, 12 Sep 2018 20:49:16 +0530 | From | Srikar Dronamraju <> | Subject | Re: [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.
| |