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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120213052729.GA24636@zhy>
Date:	Mon, 13 Feb 2012 13:27:29 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	Venki Pallipadi <venki@...gle.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Aaron Durbin <adurbin@...gle.com>,
	Paul Turner <pjt@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC] Extend mwait idle to optimize away IPIs when possible

On Thu, Feb 09, 2012 at 06:17:06PM -0800, Venki Pallipadi wrote:
> 
> This should likely work. But, if you do want to use similar logic in
> smp_call_function() or idle load balance kick etc, you need additional
> bit other than need_resched() as there we only need irq+softirq and
> not necessarily a resched.

Yeah, putting resched_idle_cpu() into smp_call_function_*() is a bit ugly
though resched could work in the scenario because you have
generic_smp_call_function_single_interrupt() called in cpu_idle();

> At this time I am not sure how poll wakeup logic works in MIPS. But,

A typical example is busy loop:
void __noreturn cpu_idle(void)
{
	...

        while (1) {
                tick_nohz_idle_enter();
                rcu_idle_enter();
                while (!need_resched() && cpu_online(cpu)) {
                	;
		}   
                rcu_idle_exit();
                tick_nohz_idle_exit();
                preempt_enable_no_resched();
                schedule();
		preempt_disable();
	}

	...
}


> if it is something that is similar to x86 mwait and we can wakeup with
> a bit other than TIF_NEED_RESCHED, we can generalize most of the
> changes in my RFC and share it across archs.

Yeah, there are many things we could share IMHO, especially the hook
in cpu_idle().

Thanks,
Yong
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ