Re: NOHZ: local_softirq_pending - More info without need for specific code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas,

More info below, I hope it helps.

Iratxo Pichel Ortiz wrote:
Thomas,

Iratxo Pichel Ortiz wrote:
 2.6.29-rt16, right ?
I have also tried rt18, but as I had thought seeing change-logs, the
behavior is exactly the same.
You were right here :) It was 29.
Do you know what could be causing this issue. I have managed to repeat this traces (NOHZ...) without using my code, using a workqueue and in the work
just by doing something like:

work_func() {
  mdelay(10);
  msleep(10);

 queue_work(myqueue, mywork);
}

And then by heavy loading the box from the outside.
I have written a very small module that causes the
"local_softirq_pending" under not some load. Please find code at the end
of this email. Here is pasted some traces of dmesg (I have increased the
ratelimit of the "NOHZ: local..." trace to 250.

The only strange thing here is that I am calling "set_workqueue_prio" (I
have hacked source to export this symbol), and I am starting to think
that this could not be a good idea. Any hints about this?

[  648.954000] NOHZ: local_softirq_pending
0e

[  648.955000] NOHZ: local_softirq_pending
0e

[  648.956000] NOHZ: local_softirq_pending
0e
I have changed the implementation of the module test to use kthreads
instead of workqueues. The behavior is exactly the same. I have tried
with prios from 1 to 99. Please find the code below as before. I have
also atached the differente softirqs codes that had been pending in some
of the tests.


Does it work when you disable CONFIG_NOHZ ?
Still pending to test.
I will try this and let the list know.
Thanks,

       tglx
Thanks a lot again!

   Iratxo.

---- DMESG ----
[4294833.294000] NOHZ: local_softirq_pending
06
[4294833.295000] NOHZ: local_softirq_pending
06
[4294834.246000] NOHZ: local_softirq_pending
02
[4294834.247000] NOHZ: local_softirq_pending
02
[4294834.248000] NOHZ: local_softirq_pending 02

---- Test module code ----

#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/delay.h>

#define LATENCY_PRIO    1

struct task_struct *t;

int LatencyzerWork(void* data)
{
   static int count;

   while(1) {
       /* Busy and normal waiting */
       mdelay(10);
       msleep(1);

   /* Requeue work */
   if(count++ > 400000)
       break;
   }

   printk("LAT: Count reached %d, stopped latencying\n", count);
   return 0;
}

int __init LatencyzerInit(void)
{
   struct sched_param schedp;

   /* Prepare Thread */
   printk("LAT: Initializing latencyzer\n");
   if(!(t = kthread_create(LatencyzerWork, NULL, "LATENCY"))) {
       printk("LAT: Error creating thread\n");
       return -1;
   }

   /* Change task prio */
   schedp.sched_priority = LATENCY_PRIO;
   sched_setscheduler(t, SCHED_FIFO, &schedp);
   printk("LAT: Task prio set to %u\n", LATENCY_PRIO);

   /* Run thread */
   wake_up_process(t);
   return 0;
}

void __exit LatencyzerExit(void)
{
   printk("LAT: Latencyzer exiting...");

   /* Done here */
   kthread_stop(t);
   printk(" DONE\n");

   return;
}

module_init(LatencyzerInit);
module_exit(LatencyzerExit);
MODULE_LICENSE("GPL");


--
Iratxo Pichel Ortiz
Software Development Manager

Albentia Systems S.A.
http://www.albentia.com

Tel: +34 914400567
Cel: +34 663808405
Fax: +34 914400569

C\Margarita Salas 22
Parque Tecnológico de Leganés
Leganés (28918)
Madrid
Spain


--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux