9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] taslock.c change.
@ 2007-05-01 20:58 erik quanstrom
  2007-05-01 21:12 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: erik quanstrom @ 2007-05-01 20:58 UTC (permalink / raw)
  To: 9fans

can someone explain why this panic was removed from taslock.c?

taslock.c:145,153 - /n/sources/plan9/sys/src/9/port//taslock.c:145,150
  			panic("corrupt ilock %p pc=%luX m=%p isilock=%d", 
  				l, l->pc, l->m, l->isilock);
  		}
- 		if(l->m == MACHP(m->machno))
- 			panic("ilock: deadlock on cpu%d pc=%luX lockpc=%luX\n", 
- 				m->machno, pc, l->pc);
  		for(;;){
  			lockstats.inglare++;
  			splx(x);


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

* Re: [9fans] taslock.c change.
  2007-05-01 20:58 [9fans] taslock.c change erik quanstrom
@ 2007-05-01 21:12 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2007-05-01 21:12 UTC (permalink / raw)
  To: 9fans

> taslock.c:145,153 - /n/sources/ plan9/sys/src/9/port//taslock.c:145,150
>   			panic("corrupt ilock %p pc=%luX m=%p isilock=%d", 
>   				l, l->pc, l->m, l->isilock);
>   		}
> - 		if(l->m == MACHP(m->machno))
> - 			panic("ilock: deadlock on cpu%d pc=%luX lockpc=%luX\n", 
> - 				m->machno, pc, l->pc);
>   		for(;;){
>   			lockstats.inglare++;
>   			splx(x);

i removed them because they contradicted the 
comment a few lines up:

		/*
		 * Cannot also check l->pc and l->m here because
		 * they might just not be set yet, or the lock might 
		 * even have been let go.
		 */

and so i thought the deadlock message i was getting
was actually incorrect.

it should go back, i suppose -- my problem turned
out that the deadlock message was mostly correct 
and that some stray kernel code was scribbling on
other people's memory.  but if it does go back
the coherence lines in iunlock should move up one
statement, i believe.

russ



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

end of thread, other threads:[~2007-05-01 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-01 20:58 [9fans] taslock.c change erik quanstrom
2007-05-01 21:12 ` Russ Cox

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