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-next>] [day] [month] [year] [list]
Message-ID: <20160418133709.GA10358@localhost.localdomain>
Date:	Mon, 18 Apr 2016 15:37:09 +0200
From:	Richard Cochran <richardcochran@...il.com>
To:	vatikaharlalka@...il.com
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org
Subject: get_nohz_timer_target?


Looking at kernel/sched/core.c:get_nohz_timer_target(), I don't
understand the change made in:

    commit 9642d18eee2cd169b60c6ac0f20bda745b5a3d1e
    Author: Vatika Harlalka <vatikaharlalka@...il.com>
    Date:   Tue Sep 1 16:50:59 2015 +0200
    nohz: Affine unpinned timers to housekeepers

After that change, the code now reads like this:

	int i, cpu = smp_processor_id();
	struct sched_domain *sd;

	if (!idle_cpu(cpu) && is_housekeeping_cpu(cpu))
		return cpu;

	rcu_read_lock();
	for_each_domain(cpu, sd) {
		for_each_cpu(i, sched_domain_span(sd)) {
			if (!idle_cpu(i) && is_housekeeping_cpu(cpu)) {
--------------------------------------------------------------- ^^^
Was this supposed to be 'i' instead?
If not, how does this test make any sense?
In any case, testing over and over again is surely wasteful.
---------------------------------------------------------------
				cpu = i;
				goto unlock;
			}
		}
	}

	if (!is_housekeeping_cpu(cpu))
		cpu = housekeeping_any_cpu();
unlock:
	rcu_read_unlock();
	return cpu;

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ