lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180912151916.GA15221@linux.vnet.ibm.com>
Date:   Wed, 12 Sep 2018 20:49:16 +0530
From:   Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Rik van Riel <riel@...riel.com>,
        Thomas Gleixner <tglx@...utronix.de>
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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ