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, 4 Feb 2009 20:43:39 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Mandeep Singh Baines <msb@...gle.com>
Cc:	Frédéric Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, rientjes@...gle.com,
	mbligh@...gle.com, thockin@...gle.com,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/2 v3] softlockup: check all tasks in hung_task


* Mandeep Singh Baines <msb@...gle.com> wrote:

> +static void check_hung_rcu_refresh(struct task_struct *g, struct task_struct *t)

please rename this to rcu_lock_break().

>  	do_each_thread(g, t) {
> -		if (!--max_count)
> -			goto unlock;
> +		if (!--max_count) {
> +			max_count = sysctl_hung_task_check_count;
> +			check_hung_rcu_refresh(g, t);
> +			/* Exit if t or g was unhashed during refresh. */
> +			if (t->state == TASK_DEAD || g->state == TASK_DEAD)
> +				goto unlock;

Thinking about it some more, i think a slightly different approach (that has 
the same end effect):

 - Add a "static const int check_count_batching = 1024;" variable that adds 
   some natural batching - and initialize max_count to that value. There's 
   little point to make that batching configurable.

 - Leave sysctl_hung_task_check_count present but change its default to 
   something really large like MAX_PID.

Thanks,

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