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: <27240C0AC20F114CBF8149A2696CBE4A01E69C5E@SHSMSX101.ccr.corp.intel.com>
Date:	Wed, 3 Sep 2014 09:58:56 +0000
From:	"Liu, Chuansheng" <chuansheng.liu@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>,
	Andy Lutomirski <luto@...capital.net>
CC:	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	"Wang, Xiaoming" <xiaoming.wang@...el.com>,
	Ingo Molnar <mingo@...hat.com>,
	"Chakravarty, Souvik K" <souvik.k.chakravarty@...el.com>,
	"Liu, Changcheng" <changcheng.liu@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/3] sched: Add new API wake_up_if_idle() to wake up the
 idle cpu



> -----Original Message-----
> From: Peter Zijlstra [mailto:peterz@...radead.org]
> Sent: Wednesday, September 03, 2014 5:54 PM
> To: Andy Lutomirski
> Cc: Liu, Chuansheng; linux-pm@...r.kernel.org; Rafael J. Wysocki; Daniel
> Lezcano; Wang, Xiaoming; Ingo Molnar; Chakravarty, Souvik K; Liu, Changcheng;
> linux-kernel@...r.kernel.org
> Subject: Re: [PATCH 1/3] sched: Add new API wake_up_if_idle() to wake up the
> idle cpu
> 
> On Thu, Aug 21, 2014 at 02:21:51PM -0700, Andy Lutomirski wrote:
> > On Aug 18, 2014 3:52 AM, "Chuansheng Liu" <chuansheng.liu@...el.com>
> wrote:
> 
> > > +void wake_up_if_idle(int cpu)
> > > +{
> > > +       struct rq *rq = cpu_rq(cpu);
> > > +       unsigned long flags;
> > > +
> > > +       if (set_nr_if_polling(rq->idle)) {
> > > +               trace_sched_wake_idle_without_ipi(cpu);
> > > +       } else {
> > > +
> >
> > FWIW, adding:
> >
> > if (rq->curr != rq->idle)
> >     return;
> >
> > Right here could improve performance on large, mostly non-idle
> > systems.  It would skip the spinlock in most cases.
> >
> 
>  !is_idle_task() :-)
Thanks Peter and Andy, will refine the patches again:)


--
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