public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jmerkey <jmerkey@utah-nac.org>
To: Bernd Eckenfels <ecki@lina.inka.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] DSFS Network Forensic File System for Linux Patches
Date: Wed, 31 Aug 2005 19:44:03 -0600	[thread overview]
Message-ID: <43165CE3.9080704@utah-nac.org> (raw)
In-Reply-To: <431651BC.9020108@utah-nac.org>

Bernd,

It might be helpful for someone to look at these sections of code I had 
to patch in 2.6.9.
I discovered a case where the kernel scheduler will pass NULL for the 
array argument
when I started hitting the extreme upper range > 200MB/S combined disk 
and lan
throughput.  This was running with preemptible kernel and hyperthreading 
enabled.

The wheels come off in the kernel somewhere.  I looked at later 2.6 
kernels and there's
been some changes, but someone may get an ah ha from this fix, if there 
is an underlying
problem in the kernel.  

Jeff


 static void dequeue_task(struct task_struct *p, prio_array_t *array)
 {
-    array->nr_active--;
-    list_del(&p->run_list);
-    if (list_empty(array->queue + p->prio))
-        __clear_bit(p->prio, array->bitmap);
+        if (!array)
+           printk("WARN:  prio_array was NULL in dequeue task %08X"
+                  "pid-%d\n", (unsigned)p, (int)p->pid);
+
+        if (array)
+        {
+       array->nr_active--;
+       list_del(&p->run_list);
+       if (list_empty(array->queue + p->prio))
+           __clear_bit(p->prio, array->bitmap);
+        }
 }
 

static void deactivate_task(struct task_struct *p, runqueue_t *rq)
 {
-    rq->nr_running--;
-    if (p->state == TASK_UNINTERRUPTIBLE)
-        rq->nr_uninterruptible++;
-    dequeue_task(p, p->array);
-    p->array = NULL;
+        if (!p->array)
+           printk("WARN:  prio_array was NULL in deactivate task %08X"
+                  "pid-%d\n", (unsigned)p, (int)p->pid);
+
+        if (p->array)
+        {
+       rq->nr_running--;
+       if (p->state == TASK_UNINTERRUPTIBLE)
+           rq->nr_uninterruptible++;
+       dequeue_task(p, p->array);
+       p->array = NULL;
+        }
 }
 


  reply	other threads:[~2005-09-01  2:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-31 16:33 [ANNOUNCE] DSFS Network Forensic File System for Linux Patches Jeff V. Merkey
2005-08-31 18:32 ` Rik van Riel
2005-08-31 17:27   ` Jeff V. Merkey
2005-08-31 18:58     ` Arjan van de Ven
2005-08-31 18:00       ` Jeff V. Merkey
2005-08-31 21:28         ` Valdis.Kletnieks
2005-08-31 20:23           ` Jeff V. Merkey
2005-08-31 20:27             ` Jeff V. Merkey
2005-08-31 23:22               ` Diego Calleja
2005-08-31 22:50                 ` jmerkey
2005-09-01  0:36                   ` Bernd Eckenfels
2005-09-01  0:33                 ` Bernd Eckenfels
2005-09-01  0:56                   ` jmerkey
2005-09-01  1:44                     ` jmerkey [this message]
     [not found]                       ` <67029b1705083120142c0c1dea@mail.gmail.com>
2005-09-01  3:19                         ` Zhou Yingchao
2005-09-01  7:12                       ` Lincoln Dale
2005-09-01  7:45                     ` Vojtech Pavlik
2005-09-01 10:23                       ` Alan Cox
2005-09-01  8:28                     ` Bernd Petrovitsch
2005-09-01 10:15                   ` Alan Cox
2005-09-03 21:26                     ` Bernd Eckenfels
2005-09-04  8:45                       ` Alan Cox
2005-09-05 20:19                         ` Bernd Eckenfels
2005-08-31 21:49     ` Jose Luis Domingo Lopez
2005-09-01 21:11       ` Alistair John Strachan

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=43165CE3.9080704@utah-nac.org \
    --to=jmerkey@utah-nac.org \
    --cc=ecki@lina.inka.de \
    --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