linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Steve Fox <drfickle@us.ibm.com>,
	"Martin J. Bligh" <mbligh@mbligh.org>
Subject: Re: 2.6.21-rc4-mm1
Date: Sat, 24 Mar 2007 08:45:30 +1100	[thread overview]
Message-ID: <200703240845.30484.kernel@kolivas.org> (raw)
In-Reply-To: <4603C7EC.6030906@shadowen.org>

On Friday 23 March 2007 23:28, Andy Whitcroft wrote:
> Andy Whitcroft wrote:
> > Con Kolivas wrote:
> >> On Friday 23 March 2007 05:17, Andy Whitcroft wrote:
> >>> Ok, I have yet a third x86_64 machine is is blowing up with the latest
> >>> 2.6.21-rc4-mm1+hotfixes+rsdl-0.32 but working with
> >>> 2.6.21-rc4-mm1+hotfixes-RSDL.  I have results on various hotfix levels
> >>> so I have just fired off a set of tests across the affected machines on
> >>> that latest hotfix stack plus the RSDL backout and the results should
> >>> be in in the next hour or two.
> >>>
> >>> I think there is a strong correlation between RSDL and these hangs. 
> >>> Any suggestions as to the next step.
> >>
> >> Found a nasty in requeue_task
> >> +	if (list_empty(old_array->queue + old_prio))
> >> +		__clear_bit(old_prio, p->array->prio_bitmap);
> >>
> >> see anything wrong there? I do :P
> >>
> >> I'll queue that up with the other changes pending and hopefully that
> >> will fix your bug.
> >
> > Tests queued with your rdsl-0.33 patch (I am assuming its in there).
> > Will let you know how it looks.
>
> Hmmm, this is good for the original machine (as was 0.32) but not for
> either of the other two.  I am seeing panics as below on those two.

This machine seems most sensitive to it (first column):
elm3b6
amd64
newisys
4cpu
config: amd64

Can you throw this debugging patch at it please? The console output might be 
very helpful. On top of sched-rsdl-0.33 thanks!

---
 kernel/sched.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Index: linux-2.6.21-rc4-mm1/kernel/sched.c
===================================================================
--- linux-2.6.21-rc4-mm1.orig/kernel/sched.c	2007-03-24 08:32:19.000000000 +1100
+++ linux-2.6.21-rc4-mm1/kernel/sched.c	2007-03-24 08:42:04.000000000 +1100
@@ -659,6 +659,25 @@ static inline void set_task_entitlement(
 	p->time_slice = p->quota;
 }
 
+static int debug_rqbitmap(struct rq *rq)
+{
+	struct list_head *queue;
+	int idx = 0, error = 0;
+	struct prio_array *array = rq->active;
+
+	for (idx = 0; idx < MAX_PRIO; idx++) {
+		queue = array->queue + idx;
+		if (!list_empty(queue)) {
+			if (!test_bit(idx, rq->dyn_bitmap)) {
+				__set_bit(idx, rq->dyn_bitmap);
+				error = 1;
+				printk(KERN_ERR "MISSING DYNAMIC BIT %d\n", idx);
+			}
+		}
+	}
+	return error;
+}
+
 /*
  * There is no specific hard accounting. The dynamic bits can have
  * false positives. rt_tasks can only be on the active queue.
@@ -679,6 +698,7 @@ static void dequeue_task(struct task_str
 	list_del_init(&p->run_list);
 	if (list_empty(p->array->queue + p->prio))
 		__clear_bit(p->prio, p->array->prio_bitmap);
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 /*
@@ -797,12 +817,14 @@ static void enqueue_task(struct task_str
 {
 	__enqueue_task(p, rq);
 	list_add_tail(&p->run_list, p->array->queue + p->prio);
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 static inline void enqueue_task_head(struct task_struct *p, struct rq *rq)
 {
 	__enqueue_task(p, rq);
 	list_add(&p->run_list, p->array->queue + p->prio);
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 /*
@@ -820,6 +842,7 @@ static void requeue_task(struct task_str
 			__clear_bit(old_prio, old_array->prio_bitmap);
 		set_dynamic_bit(p, rq);
 	}
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 /*
@@ -906,6 +929,7 @@ static inline void __activate_task(struc
 {
 	enqueue_task(p, rq);
 	inc_nr_running(p, rq);
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 /*
@@ -1006,6 +1030,7 @@ static void deactivate_task(struct task_
 {
 	dec_nr_running(p, rq);
 	dequeue_task(p, rq);
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 /*
@@ -1718,9 +1743,11 @@ void fastcall wake_up_new_task(struct ta
 		 * Parent and child are on different CPUs, now get the
 		 * parent runqueue to update the parent's ->flags:
 		 */
+		WARN_ON(debug_rqbitmap(rq));
 		task_rq_unlock(rq, &flags);
 		this_rq = task_rq_lock(current, &flags);
 	}
+	WARN_ON(debug_rqbitmap(this_rq));
 	task_rq_unlock(this_rq, &flags);
 }
 
@@ -3357,6 +3384,7 @@ static inline void major_prio_rotation(s
 	rq->dyn_bitmap = rq->active->prio_bitmap;
 	rq->best_static_prio = MAX_PRIO - 1;
 	rq->prio_rotation++;
+	WARN_ON(debug_rqbitmap(rq));
 }
 
 /*
@@ -3399,6 +3427,8 @@ static inline void rotate_runqueue_prior
 		}
 		memset(rq->prio_quota, 0, ARRAY_SIZE(rq->prio_quota));
 		major_prio_rotation(rq);
+		WARN_ON(debug_rqbitmap(rq));
+
 	} else {
 		/* Minor rotation */
 		new_prio_level = rq->prio_level + 1;
@@ -3409,6 +3439,7 @@ static inline void rotate_runqueue_prior
 			__set_bit(new_prio_level, rq->dyn_bitmap);
 		}
 		rq_quota(rq, rq->prio_level) = 0;
+		WARN_ON(debug_rqbitmap(rq));
 	}
 	rq->prio_level = new_prio_level;
 	/*
@@ -3431,6 +3462,10 @@ static void task_running_tick(struct rq 
 		return;
 
 	spin_lock(&rq->lock);
+	if (!p->time_slice) {
+		printk(KERN_ERR "NO TIME_SLICE IN TRT \n");
+		p->time_slice++;
+	}
 	/*
 	 * Accounting is performed by both the task and the runqueue. This
 	 * allows frequently sleeping tasks to get their proper quota of
@@ -3460,6 +3495,7 @@ static void task_running_tick(struct rq 
 		set_tsk_need_resched(p);
 	}
 out_unlock:
+	WARN_ON(debug_rqbitmap(rq));
 	spin_unlock(&rq->lock);
 }
 
@@ -3479,6 +3515,7 @@ void scheduler_tick(void)
 
 	if (!idle_at_tick)
 		task_running_tick(rq, p, 1);
+	WARN_ON(debug_rqbitmap(rq));
 #ifdef CONFIG_SMP
 	update_load(rq);
 	rq->idle_at_tick = idle_at_tick;
@@ -3548,6 +3585,7 @@ static inline struct task_struct *next_d
 	struct prio_array *array = rq->active;
 	int expirations = 0;
 
+	WARN_ON(debug_rqbitmap(rq));
 retry:
 	if (idx >= MAX_PRIO) {
 		BUG_ON(++expirations > 1);
@@ -3601,6 +3639,7 @@ retry:
 	if (next->static_prio < rq->best_static_prio &&
 	    next->policy != SCHED_BATCH)
 		rq->best_static_prio = next->static_prio;
+	WARN_ON(debug_rqbitmap(rq));
 	return next;
 }
 


-- 
-ck

  parent reply	other threads:[~2007-03-23 21:47 UTC|newest]

Thread overview: 146+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20  4:56 2.6.21-rc4-mm1 Andrew Morton
2007-03-20  7:54 ` 2.6.21-rc4-mm1 Michal Piotrowski
2007-03-20  9:45 ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-22  8:41   ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-22  9:48     ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-22 10:04       ` 2.6.21-rc4-mm1 Con Kolivas
2007-03-22 17:07         ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-22 18:17           ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-22 22:14             ` 2.6.21-rc4-mm1 Con Kolivas
2007-03-23  6:18             ` 2.6.21-rc4-mm1 Con Kolivas
2007-03-23  8:45               ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-23 12:28                 ` 2.6.21-rc4-mm1 Andy Whitcroft
2007-03-23 15:53                   ` 2.6.21-rc4-mm1 Fortier,Vincent [Montreal]
2007-03-23 21:45                   ` Con Kolivas [this message]
2007-03-23 23:26                     ` debug rsdl 0.33 Con Kolivas
2007-03-25 12:27                       ` Andy Whitcroft
2007-03-25 18:28                       ` Torsten Kaiser
2007-03-25 22:01                         ` Andrew Morton
2007-03-25 22:49                         ` Con Kolivas
2007-03-25 22:59                           ` Con Kolivas
2007-03-26  7:49                             ` Andy Whitcroft
2007-03-26 15:28                               ` Andy Whitcroft
2007-03-26 16:12                                 ` Con Kolivas
2007-03-20 10:52 ` 2.6.21-rc4-mm1 [PATCH] init/missing_syscalls.h fix Stephane Jourdois
2007-03-20 14:31 ` 2.6.21-rc4-mm1 Jiri Slaby
2007-03-20 16:09   ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-20 18:38     ` 2.6.21-rc4-mm1 Pavel Machek
2007-03-20 19:40       ` 2.6.21-rc4-mm1 Jiri Slaby
2007-03-20 19:56         ` 2.6.21-rc4-mm1 Pavel Machek
2007-03-20 20:13           ` 2.6.21-rc4-mm1 Jiri Slaby
2007-03-20 20:21             ` [linux-pm] 2.6.21-rc4-mm1 Pavel Machek
2007-03-20 20:58               ` Rafael J. Wysocki
2007-03-20 20:58                 ` Jiri Slaby
2007-03-20 21:06                   ` Rafael J. Wysocki
     [not found]                     ` <200703210149.33240.rjw@sisk.pl>
2007-03-21  1:23                       ` [linux-pm] 2.6.21-rc4-mm1: freezing of processes broken Eric W. Biederman
2007-03-21  2:47                         ` sukadev
2007-03-21  3:13                         ` Nigel Cunningham
2007-03-21 14:23                           ` Oleg Nesterov
2007-03-21 14:45                             ` Rafael J. Wysocki
2007-03-21 16:20                               ` Andrew Morton
2007-03-21 16:55                                 ` Oleg Nesterov
2007-03-21 17:08                                   ` Andrew Morton
2007-03-21 18:07                                     ` sukadev
2007-03-21 18:16                                       ` Eric W. Biederman
2007-03-21 18:23                                         ` sukadev
2007-03-21 17:15                                   ` Oleg Nesterov
2007-03-21 12:08                         ` Rafael J. Wysocki
2007-03-20 20:12         ` 2.6.21-rc4-mm1 Rafael J. Wysocki
2007-03-20 16:36 ` 2.6.21-rc4-mm1 J.A. Magallón
2007-03-21  0:14   ` 2.6.21-rc4-mm1 J.A. Magallón
2007-03-20 17:31 ` 2.6.21-rc4-mm1 Randy Dunlap
2007-03-20 19:20   ` 2.6.21-rc4-mm1 Kees Cook
2007-03-20 20:42     ` 2.6.21-rc4-mm1 Stéphane Jourdois
2007-03-20 20:50     ` 2.6.21-rc4-mm1 Randy Dunlap
2007-03-21  5:47     ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-21 11:25       ` 2.6.21-rc4-mm1 David Woodhouse
2007-03-21 11:59       ` 2.6.21-rc4-mm1 Sam Ravnborg
2007-03-22  9:17         ` 2.6.21-rc4-mm1 David Woodhouse
2007-03-22 11:41           ` 2.6.21-rc4-mm1 Sam Ravnborg
2007-03-22 16:25             ` 2.6.21-rc4-mm1 David Woodhouse
2007-03-22 16:28               ` 2.6.21-rc4-mm1 Sam Ravnborg
2007-03-21 22:19       ` 2.6.21-rc4-mm1 Sam Ravnborg
2007-03-21 22:22         ` [PATCH 1/3] kbuild: complain about missing system calls Sam Ravnborg
2007-05-07 22:29           ` Tony Luck
2007-05-07 22:39             ` David Woodhouse
2007-05-07 22:51               ` Luck, Tony
2007-05-08 18:24                 ` Sam Ravnborg
2007-05-08 18:35                   ` Luck, Tony
2007-05-08 18:49                     ` Sam Ravnborg
2007-03-21 22:23         ` [PATCH 2/3] kbuild: ignore more i386 legacy syscalls Sam Ravnborg
2007-03-21 22:24         ` [PATCH 3/3] kbuild: exempt more syscalls from warnings, for x86_64 and ARM Sam Ravnborg
2007-03-21 23:01         ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-22  8:54           ` 2.6.21-rc4-mm1 Sam Ravnborg
2007-03-20 18:09 ` [PATCH] utrace: make an inline void Randy Dunlap
2007-03-21  1:48   ` Roland McGrath
2007-03-20 20:49 ` 2.6.21-rc4-mm1: multiple definition of `queue_pushbutton_work' Adrian Bunk
2007-03-21 18:45   ` Kristen Carlson Accardi
2007-03-20 21:04 ` 2.6.21-rc4-mm1 J.A. Magallón
2007-03-20 23:10 ` FireWire update in -mm (was 2.6.21-rc4-mm1) Stefan Richter
2007-03-20 23:49 ` 2.6.21-rc4-mm1 Randy Dunlap
2007-03-21  1:47 ` 2.6.21-rc4-mm1 Randy Dunlap
2007-03-21 18:36   ` 2.6.21-rc4-mm1 Greg KH
     [not found] ` <1174433034.62033.16.camel@localhost>
2007-03-21  6:36   ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-21  9:52     ` 2.6.21-rc4-mm1 Edward Shishkin
2007-03-21 14:12     ` [Bluez-devel] 2.6.21-rc4-mm1 Marcel Holtmann
2007-03-23 19:45       ` Zan Lynx
2007-03-21 16:13     ` 2.6.21-rc4-mm1 Larry Finger
2007-03-23 19:40       ` 2.6.21-rc4-mm1 Zan Lynx
2007-03-24  1:49         ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 18:14     ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 18:34       ` 2.6.21-rc4-mm1 Michael Buesch
2007-03-21 19:00         ` 2.6.21-rc4-mm1 John W. Linville
2007-03-21 18:59       ` 2.6.21-rc4-mm1 John W. Linville
2007-03-21 20:22         ` 2.6.21-rc4-mm1 Matt Mackall
2007-03-21 20:48           ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 21:03           ` 2.6.21-rc4-mm1 Larry Finger
2007-03-21 21:39             ` 2.6.21-rc4-mm1 Randy Dunlap
2007-03-21 21:45           ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-22  7:39           ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-22 11:35             ` 2.6.21-rc4-mm1 Cornelia Huck
     [not found]               ` <4602752A.5050109@lwfinger.net>
2007-03-22 17:10                 ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-22 18:55                   ` 2.6.21-rc4-mm1 Larry Finger
2007-03-23 10:10                     ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-23 15:00                       ` 2.6.21-rc4-mm1 Larry Finger
2007-03-24  5:06                       ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-26  9:09                         ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-26  9:22                           ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-26 10:34                             ` 2.6.21-rc4-mm1 Eric Rannaud
2007-03-26 10:44                               ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-27  9:25                               ` 2.6.21-rc4-mm1 Kay Sievers
2007-03-27 17:17                                 ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-28  1:26                                   ` 2.6.21-rc4-mm1 Eric Rannaud
2007-03-28  8:25                                     ` 2.6.21-rc4-mm1 Cornelia Huck
2007-03-24 22:32             ` 2.6.21-rc4-mm1 Matt Mackall
2007-03-21 18:49     ` 2.6.21-rc4-mm1 - problem with cpuidle routine Larry Finger
2007-03-21 20:38       ` Andrew Morton
2007-03-22  0:33         ` Venkatesh Pallipadi
2007-03-30  1:25           ` 2.6.21-rc4-mm1 and rc5-mm2 " Ed Sweetman
2007-03-30  2:17             ` Lee Revell
2007-03-21 20:39       ` 2.6.21-rc4-mm1 " Venki Pallipadi
2007-03-21 10:14 ` 2.6.21-rc4-mm1 Reuben Farrelly
2007-03-22 23:27 ` 2.6.21-rc4-mm1 J.A. Magallón
2007-03-23  1:41   ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-26 20:31   ` 2.6.21-rc4-mm1 J.A. Magallón
2007-03-24 13:06 ` [-mm patch] lguest: #if 0 check_bug_kill() Adrian Bunk
2007-03-25  7:33   ` Rusty Russell
2007-03-25 14:57     ` [-mm patch] lguest: remove check_bug_kill() Adrian Bunk
2007-03-24 13:06 ` [-mm patch] drivers/scsi/constants.c: make 2 functions static Adrian Bunk
2007-03-24 16:11   ` Douglas Gilbert
2007-03-24 17:02     ` Adrian Bunk
2007-03-24 13:07 ` [-mm patch] fs/revoke.c: cleanups (and bugfix for 64bit systems) Adrian Bunk
2007-03-24 13:15   ` Pekka Enberg
2007-03-24 13:07 ` [-mm patch] unexport bio_{,un}map_user Adrian Bunk
2007-03-25 14:58 ` [-mm patch] drivers/eisa/pci_eisa.c:pci_eisa_init() should be init Adrian Bunk
2007-03-26  0:24 ` Wrong IDE cable detection in libata [Re: 2.6.21-rc4-mm1] J.A. Magallón
2007-03-26 11:01   ` Tejun Heo
2007-03-26 20:18     ` J.A. Magallón
2007-03-26 19:47 ` 2.6.21-rc4-mm1 Badari Pulavarty
2007-03-26 23:29   ` 2.6.21-rc4-mm1 Paul Mackerras
2007-03-26 20:05 ` 2.6.21-rc4-mm1 Badari Pulavarty
2007-03-26 19:35   ` 2.6.21-rc4-mm1 Jean Delvare
2007-03-26 23:26     ` 2.6.21-rc4-mm1 Greg KH
2007-03-26 21:57 ` 2.6.21-rc4-mm1 Badari Pulavarty
2007-03-26 22:22   ` 2.6.21-rc4-mm1 Andrew Morton
2007-03-26 23:43     ` 2.6.21-rc4-mm1 Badari Pulavarty
  -- strict thread matches above, loose matches on Subject: below --
2007-03-21 22:45 2.6.21-rc4-mm1 Nicolas Mailhot

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=200703240845.30484.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=drfickle@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@mbligh.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;
as well as URLs for NNTP newsgroup(s).