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:	Wed, 28 Aug 2013 17:13:12 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Jamie Liu <jamieliu@...gle.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] workqueue: defer to waiting stop_machine

On Wed, Aug 28, 2013 at 02:07:12PM -0700, Jamie Liu wrote:
...
> @@ -734,7 +735,8 @@ static bool may_start_working(struct worker_pool *pool)
>  static bool keep_working(struct worker_pool *pool)
>  {
>  	return !list_empty(&pool->worklist) &&
> -		atomic_read(&pool->nr_running) <= 1;
> +		atomic_read(&pool->nr_running) <= 1 &&
> +		likely(!stop_machine_pending());

Isn't the problem that the kworker wouldn't yield to the higher
priority stopper task while a work item keeps requeueing itself if
preemption is not enabled?  If so, isn't the correct solution just
adding cond_resched() in the work item processing loop?  The analysis
and solution seem to have gone a bit stray....

Thanks.

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