public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yury V. Umanets" <umka@namesys.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Brad Laue <brad@brad-x.com>, linux-kernel@vger.kernel.org
Subject: Re: ksoftirqd using mysteriously high amounts of CPU time
Date: Thu, 11 Mar 2004 16:05:47 +0200	[thread overview]
Message-ID: <1079013947.24999.17.camel@firefly> (raw)
In-Reply-To: <20040311020832.1aa25177.akpm@osdl.org>

On Thu, 2004-03-11 at 12:08, Andrew Morton wrote:
> Brad Laue <brad@brad-x.com> wrote:
> >
> >  Brad Laue wrote:
> >  > Hopefully the attached shows some irregularity. If not, I'll have to 
> >  > reply back in a few weeks when the problem recurs over the course of time.
> > 
> >  And without further ado, the attachment. It's been a long day. :)
> 
> It beats me.  Something must be waking up ksoftirqd all the time.

Hello,

I have impression, that it is somehow related to ACPI and CPU
temperature. When CPU gets more hot ksoftirqd starts to eat 99% of CPU.

It may be checked by disabling ACPI (if enabled) and/or monitoring
/proc/acpi/thermal_zone/THRM/temperature (if any).

> 
> If you have time, could you please apply the below, then wait for ksoftirqd
> to go bad again and then run:
> 
> 
> 	dmesg -c
> 	echo 1 > /proc/sys/debug/0 ; sleep 1; echo 0 > /proc/sys/debug/0
> 	dmesg -s 1000000 > /tmp/foo
> 
> and then send foo?
> 
> 
> diff -puN include/linux/kernel.h~proc-sys-debug include/linux/kernel.h
> --- 25/include/linux/kernel.h~proc-sys-debug	2004-02-25 23:12:56.000000000 -0800
> +++ 25-akpm/include/linux/kernel.h	2004-02-25 23:12:57.000000000 -0800
> @@ -214,6 +214,8 @@ extern void dump_stack(void);
>  	1; \
>  })
>  
> +extern int proc_sys_debug[8];
> +
>  #endif /* __KERNEL__ */
>  
>  #define SI_LOAD_SHIFT	16
> diff -puN -L kernel/ksyms.c /dev/null /dev/null
> diff -puN kernel/sysctl.c~proc-sys-debug kernel/sysctl.c
> --- 25/kernel/sysctl.c~proc-sys-debug	2004-02-25 23:12:56.000000000 -0800
> +++ 25-akpm/kernel/sysctl.c	2004-02-25 23:21:37.000000000 -0800
> @@ -849,7 +849,26 @@ static ctl_table fs_table[] = {
>  	{ .ctl_name = 0 }
>  };
>  
> +int proc_sys_debug[8];
> +EXPORT_SYMBOL(proc_sys_debug);
> +
>  static ctl_table debug_table[] = {
> +	{1, "0", &proc_sys_debug[0], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{2, "1", &proc_sys_debug[1], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{3, "2", &proc_sys_debug[2], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{4, "3", &proc_sys_debug[3], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{5, "4", &proc_sys_debug[4], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{6, "5", &proc_sys_debug[5], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{7, "6", &proc_sys_debug[6], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
> +	{8, "7", &proc_sys_debug[7], sizeof(int), 0644, NULL,
> +	 &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, NULL},
>  	{ .ctl_name = 0 }
>  };
>  
> 
> _
>  kernel/softirq.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff -puN kernel/softirq.c~a kernel/softirq.c
> --- 25/kernel/softirq.c~a	2004-03-11 02:05:20.000000000 -0800
> +++ 25-akpm/kernel/softirq.c	2004-03-11 02:06:02.000000000 -0800
> @@ -54,8 +54,13 @@ static inline void wakeup_softirqd(void)
>  	/* Interrupts are disabled: no need to stop preemption */
>  	struct task_struct *tsk = __get_cpu_var(ksoftirqd);
>  
> -	if (tsk && tsk->state != TASK_RUNNING)
> +	if (tsk && tsk->state != TASK_RUNNING) {
> +		if (proc_sys_debug[0]) {
> +			printk("%s wakes ksoftirqd\n", current->comm);
> +			dump_stack();
> +		}
>  		wake_up_process(tsk);
> +	}
>  }
>  
>  /*
> 
> _
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-- 
umka


  reply	other threads:[~2004-03-11 14:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 21:16 ksoftirqd using mysteriously high amounts of CPU time Brad Laue
2004-03-10 23:57 ` Andrew Morton
2004-03-11  8:45   ` Brad Laue
2004-03-11  9:28     ` Brad Laue
2004-03-11 10:08       ` Andrew Morton
2004-03-11 14:05         ` Yury V. Umanets [this message]
2004-03-11 17:22           ` Brad Laue
2004-03-11 18:09             ` Yury V. Umanets
2004-03-11 18:21               ` Brad Laue
2004-03-11 18:24         ` Brad Laue
2004-03-12 17:51         ` Brad Laue
2004-03-11 14:00       ` Yury V. Umanets
     [not found] <Pine.LNX.4.21.0403111916570.3466-100000@linux08.ece.utexas.edu>
2004-03-12  7:06 ` Brad Laue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1079013947.24999.17.camel@firefly \
    --to=umka@namesys.com \
    --cc=akpm@osdl.org \
    --cc=brad@brad-x.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox