* [PATCH] Janitor: Typo in stack debug code
@ 2011-09-13 16:20 Linas Vepstas (Code Aurora)
2011-09-13 16:31 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Linas Vepstas (Code Aurora) @ 2011-09-13 16:20 UTC (permalink / raw)
To: linux-kernel
In the debug routine check_stack_usage(), free stack space is counted
in units of (unsigned long), not bytes. Make this clear when printing.
It seems easiest to just change the message, instead of multiplying
by sizeof(unsigned long).
Signed-off-by: Linas Vepstas <linas@codeaurora.org>
---
===================================================================
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -888,7 +888,7 @@ static void check_stack_usage(void)
spin_lock(&low_water_lock);
if (free < lowest_to_date) {
- printk(KERN_WARNING "%s used greatest stack depth: %lu bytes "
+ printk(KERN_WARNING "%s used greatest stack depth: %lu words "
"left\n",
current->comm, free);
lowest_to_date = free;
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Janitor: Typo in stack debug code
2011-09-13 16:20 [PATCH] Janitor: Typo in stack debug code Linas Vepstas (Code Aurora)
@ 2011-09-13 16:31 ` Eric Dumazet
2011-09-13 16:39 ` Linas Vepstas (Code Aurora)
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2011-09-13 16:31 UTC (permalink / raw)
To: Linas Vepstas (Code Aurora); +Cc: linux-kernel
2011/9/13 Linas Vepstas (Code Aurora) <linas@codeaurora.org>:
>
> In the debug routine check_stack_usage(), free stack space is counted
> in units of (unsigned long), not bytes. Make this clear when printing.
>
> It seems easiest to just change the message, instead of multiplying
> by sizeof(unsigned long).
>
> Signed-off-by: Linas Vepstas <linas@codeaurora.org>
>
> ---
>
> ===================================================================
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -888,7 +888,7 @@ static void check_stack_usage(void)
>
> spin_lock(&low_water_lock);
> if (free < lowest_to_date) {
> - printk(KERN_WARNING "%s used greatest stack depth: %lu bytes "
> + printk(KERN_WARNING "%s used greatest stack depth: %lu words "
> "left\n",
> current->comm, free);
> lowest_to_date = free;
>
>
>
>
Thats not true, everything is fine.
dmesg | grep stack
[ 1.564907] kworker/u:0 used greatest stack depth: 5592 bytes left
[ 2.467909] modprobe used greatest stack depth: 5576 bytes left
[ 2.483228] exe used greatest stack depth: 5552 bytes left
[ 2.489430] all_generic_ide used greatest stack depth: 5496 bytes left
[ 2.524731] scsi_id used greatest stack depth: 5440 bytes left
[ 2.643103] blkid used greatest stack depth: 4768 bytes left
[ 4.232051] exe used greatest stack depth: 4320 bytes left
[ 4.761443] stty used greatest stack depth: 3784 bytes left
[ 6.011566] modprobe used greatest stack depth: 3664 bytes left
[ 6.011681] modprobe used greatest stack depth: 3184 bytes left
[ 339.890273] nroff used greatest stack depth: 3032 bytes left
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Janitor: Typo in stack debug code
2011-09-13 16:31 ` Eric Dumazet
@ 2011-09-13 16:39 ` Linas Vepstas (Code Aurora)
0 siblings, 0 replies; 3+ messages in thread
From: Linas Vepstas (Code Aurora) @ 2011-09-13 16:39 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-kernel
On Tue, Sep 13, 2011 at 06:31:14PM +0200, Eric Dumazet wrote:
> 2011/9/13 Linas Vepstas (Code Aurora) <linas@codeaurora.org>:
> >
> > In the debug routine check_stack_usage(), free stack space is counted
> > in units of (unsigned long), not bytes. Make this clear when printing.
>
> Thats not true, everything is fine.
You are correct, I was wrong. Wow. Monday morning fuziness on a Tues.
My apologies.
--linas
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-13 16:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 16:20 [PATCH] Janitor: Typo in stack debug code Linas Vepstas (Code Aurora)
2011-09-13 16:31 ` Eric Dumazet
2011-09-13 16:39 ` Linas Vepstas (Code Aurora)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox