RE: SMP system panic with down/up calls for locking. Need help o

B. James Phillippe (bryan@terran.org)
Mon, 4 Oct 1999 19:39:01 -0700 (PDT)


On Mon, 4 Oct 1999, WANG,YIDING (HP-SanJose,ex1) wrote:

> 1, I don't have down/up in ISR routine. System panic during making file

"interrupt-time" doesn't just mean ISR routine, it means anything which
happens outside of the context of a process. In kernel code, this is
almost everything outside of a system call*.

To demonstrate, call in_interrupt() before you call down() and if the
return value is true, printk some message instead of downing the semaphore.
That's not normal practice, but it's a quick and dirty way to test whether
or not this is your problem.

*one exception is the tq_scheduler task queue.

BTW, showing what message is printed with the panic would be very helpful..

> 2, The locking rquired in driver is for :
> a) Driver local queue, say free ccb list. When on cpu is trying to
> put a ccb back to freelist and another is getting a free ccb, it
> requires lock.

Use a spinlock for this one.

-bp

--
# bryan at terran dot org
# http://www.terran.org/~bryan

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/