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]
Date:	Tue, 25 Sep 2012 13:22:25 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	linux-kernel@...r.kernel.org, pjt@...gle.com,
	paul.mckenney@...aro.org, tglx@...utronix.de, tj@...nel.org,
	suresh.b.siddha@...el.com, venki@...gle.com, mingo@...hat.com,
	robin.randhawa@....com, Steve.Bannister@....com,
	Arvind.Chauhan@....com, amit.kucheria@...aro.org,
	vincent.guittot@...aro.org, linaro-dev@...ts.linaro.org,
	patches@...aro.org
Subject: Re: [PATCH 3/3] workqueue: Schedule work on non-idle cpu instead of
 current one

On Tue, 2012-09-25 at 16:06 +0530, Viresh Kumar wrote:
> @@ -1066,8 +1076,9 @@ int queue_work(struct workqueue_struct *wq,
> struct work_struct *work)
>  {
>         int ret;
>  
> -       ret = queue_work_on(get_cpu(), wq, work);
> -       put_cpu();
> +       preempt_disable();
> +       ret = queue_work_on(wq_select_cpu(), wq, work);
> +       preempt_enable();
>  
>         return ret;
>  }

Right, so the problem I see here is that wq_select_cpu() is horridly
expensive..

> @@ -1102,7 +1113,7 @@ static void delayed_work_timer_fn(unsigned long
> __data)
>         struct delayed_work *dwork = (struct delayed_work *)__data;
>         struct cpu_workqueue_struct *cwq = get_work_cwq(&dwork->work);
>  
> -       __queue_work(smp_processor_id(), cwq->wq, &dwork->work);
> +       __queue_work(wq_select_cpu(), cwq->wq, &dwork->work);
>  } 

Shouldn't timer migration have sorted this one?
--
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