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:	Thu, 6 Nov 2008 07:11:25 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Ken Chen <kenchen@...gle.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [patch] sched: fix single-depth wchan output


* Ken Chen <kenchen@...gle.com> wrote:

> To get a meaningful /proc/<pid>/wchan, one is required to turn on 
> full frame pointer when compile kernel/sched.c on x86 arch.  The 
> enabling of frame pointer applies to entire kernel/sched.c and 
> affects lots of other core scheduler functions that aren't related 
> to wchan's call stack unwind.  This causes unnecessary expansion of 
> stack pointer push and pop on the stack for scheduler functions.  To 
> cut down the cost of frame pointer push/pop, one can use compile 
> time config option 'single-depth wchan'.  However, the 
> 'single-depth' option is broken on x86 due to lack of stack frame 
> marker and simple stack unwind doesn't work, i.e., wchan always 
> produces '0'.
> 
> This patch adds call site location explicitly in thread_struct for 
> schedule() function so that get_wchan() can reliably get the data 
> and at the same time not to overly burden the entire kernel/sched.c 
> with frame pointer generation.  The remove of frame pointer 
> dependency allows compiler to generate better and faster core 
> scheduler code on x86_64.

hm, this adds overhead - and the thing is that WCHAN is rather 
uninformative to begin with (because it's a single dimension), so we 
should phase it out, not expand it.

How about adding a /proc/<PID>/stacktrace file that gives us the stack 
trace of any task in the system? That would be useful for a number of 
other purposes as well, and about 100 times more useful than wchan. 
(often it would be more useful than sysrq-t dumps)

Hm?

	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