linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.5.60] dcachebench sleeps
@ 2003-02-11 12:48 Maneesh Soni
  2003-02-11 20:14 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Maneesh Soni @ 2003-02-11 12:48 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

Hi,

With 2.5.60, dcachebench no more completes. All threads
go to sleep as below. Last time I tested was with an intermediated BK diff 
(diff-bk-030204-2.5.59) and it was working fine. 

I tried "./dcachebench -p 4 -b junk" on a 4-way SMP with pre-epmtion ON.

dcachebench is available at 
http://www-124.ibm.com/developerworks/opensource/linuxperf/dcachebench/dcachebench.html

dcachebench   S 00000082 2336648  1082    952  1083               (NOTLB)
Call Trace:
 [<c011f327>] sys_wait4+0x237/0x270
 [<c0118710>] default_wake_function+0x0/0x20
 [<c014ae31>] sys_llseek+0xb1/0xd0
 [<c0118710>] default_wake_function+0x0/0x20
 [<c010aa0f>] syscall_call+0x7/0xb

dcachebench   S 00000086 4500872  1083   1082          1084       (NOTLB)
Call Trace:
 [<c0128084>] sys_pause+0x14/0x20
 [<c010aa0f>] syscall_call+0x7/0xb

dcachebench   S 00000082 4286241224  1084   1082          1085  1083 (NOTLB)
Call Trace:
 [<c0114113>] smp_apic_timer_interrupt+0x113/0x140
 [<c0128084>] sys_pause+0x14/0x20
 [<c010aa0f>] syscall_call+0x7/0xb

dcachebench   S 00000086 4287956936  1085   1082          1086  1084 (NOTLB)
Call Trace:
 [<c0128084>] sys_pause+0x14/0x20
 [<c010aa0f>] syscall_call+0x7/0xb

dcachebench   S 00000086 4287513032  1086   1082                1085 (NOTLB)
Call Trace:
 [<c0128084>] sys_pause+0x14/0x20
 [<c010aa0f>] syscall_call+0x7/0xb


Regards,
Maneesh



-- 
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: maneesh@in.ibm.com
http://lse.sourceforge.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.5.60] dcachebench sleeps
  2003-02-11 12:48 [2.5.60] dcachebench sleeps Maneesh Soni
@ 2003-02-11 20:14 ` Linus Torvalds
  2003-02-12  5:12   ` Maneesh Soni
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2003-02-11 20:14 UTC (permalink / raw)
  To: linux-kernel

In article <20030211181807.A1261@in.ibm.com>,
Maneesh Soni  <maneesh@in.ibm.com> wrote:
>
>With 2.5.60, dcachebench no more completes. All threads
>go to sleep as below. Last time I tested was with an intermediated BK diff 
>(diff-bk-030204-2.5.59) and it was working fine. 

This should be fixed in the current BK tree. And for the non-BK-users,
here's the relevant changeset..

		Linus

---
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.997.1.20 -> 1.997.1.21
#	     kernel/signal.c	1.67    -> 1.68   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/02/11	torvalds@home.transmeta.com	1.997.1.21
# If we set TIF_SIGPENDING for SIGCONT, we have to wake up any sleeping
# tasks (even if we don't otherwise need to wake anything up), since
# otherwise later signals would see that signals are already pending and
# wouldn't cause wakeups.
# --------------------------------------------
#
diff -Nru a/kernel/signal.c b/kernel/signal.c
--- a/kernel/signal.c	Tue Feb 11 12:13:43 2003
+++ b/kernel/signal.c	Tue Feb 11 12:13:43 2003
@@ -619,6 +619,7 @@
 		rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending);
 		t = p;
 		do {
+			unsigned int state;
 			rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
 			
 			/*
@@ -635,9 +636,12 @@
 			 * Wake up the stopped thread _after_ setting
 			 * TIF_SIGPENDING
 			 */
-			if (!sigismember(&t->blocked, SIGCONT))
+			state = TASK_STOPPED;
+			if (!sigismember(&t->blocked, SIGCONT)) {
 				set_tsk_thread_flag(t, TIF_SIGPENDING);
-			wake_up_state(t, TASK_STOPPED);
+				state |= TASK_INTERRUPTIBLE;
+			}
+			wake_up_state(t, state);
 
 			t = next_thread(t);
 		} while (t != p);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.5.60] dcachebench sleeps
  2003-02-11 20:14 ` Linus Torvalds
@ 2003-02-12  5:12   ` Maneesh Soni
  0 siblings, 0 replies; 3+ messages in thread
From: Maneesh Soni @ 2003-02-12  5:12 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

On Wed, Feb 12, 2003 at 12:48:05AM +0000, Linus Torvalds wrote:
> In article <20030211181807.A1261@in.ibm.com>,
> Maneesh Soni  <maneesh@in.ibm.com> wrote:
> >
> >With 2.5.60, dcachebench no more completes. All threads
> >go to sleep as below. Last time I tested was with an intermediated BK diff 
> >(diff-bk-030204-2.5.59) and it was working fine. 
> 
> This should be fixed in the current BK tree. And for the non-BK-users,
> here's the relevant changeset..
> 
> 		Linus


Yes.. this fixes the dcachebench problem.

Thanks,
Maneesh


 
> ---
> # This is a BitKeeper generated patch for the following project:
> # Project Name: Linux kernel tree
> # This patch format is intended for GNU patch command version 2.5 or higher.
> # This patch includes the following deltas:
> #	           ChangeSet	1.997.1.20 -> 1.997.1.21
> #	     kernel/signal.c	1.67    -> 1.68   
> #
> # The following is the BitKeeper ChangeSet Log
> # --------------------------------------------
> # 03/02/11	torvalds@home.transmeta.com	1.997.1.21
> # If we set TIF_SIGPENDING for SIGCONT, we have to wake up any sleeping
> # tasks (even if we don't otherwise need to wake anything up), since
> # otherwise later signals would see that signals are already pending and
> # wouldn't cause wakeups.
> # --------------------------------------------
> #
> diff -Nru a/kernel/signal.c b/kernel/signal.c
> --- a/kernel/signal.c	Tue Feb 11 12:13:43 2003
> +++ b/kernel/signal.c	Tue Feb 11 12:13:43 2003
> @@ -619,6 +619,7 @@
>  		rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending);
>  		t = p;
>  		do {
> +			unsigned int state;
>  			rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
>  			
>  			/*
> @@ -635,9 +636,12 @@
>  			 * Wake up the stopped thread _after_ setting
>  			 * TIF_SIGPENDING
>  			 */
> -			if (!sigismember(&t->blocked, SIGCONT))
> +			state = TASK_STOPPED;
> +			if (!sigismember(&t->blocked, SIGCONT)) {
>  				set_tsk_thread_flag(t, TIF_SIGPENDING);
> -			wake_up_state(t, TASK_STOPPED);
> +				state |= TASK_INTERRUPTIBLE;
> +			}
> +			wake_up_state(t, state);
>  
>  			t = next_thread(t);
>  		} while (t != p);
> 
> -
> 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/
> 

-- 
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: maneesh@in.ibm.com
http://lse.sourceforge.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-12  4:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11 12:48 [2.5.60] dcachebench sleeps Maneesh Soni
2003-02-11 20:14 ` Linus Torvalds
2003-02-12  5:12   ` Maneesh Soni

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).