Re: Problem with Spinlocks in SMP kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 04, 2004 at 10:30:03 +0530, Srinivas G. wrote:
> 
> Hi, 
>  
> We developed a driver for PCI card. It was compiled and working fine under non-smp kernel. But when we port it into SMP kernel it is not working. System is going to hang permanently. What problem peter got at the following site, the same problem we got here. When we don't use spinlocks it is working fine under SMP kernel also. But when we use spinlocks it is not working under SMP kernel. The link peter posted the error I am sending here. 
>  
> http://www.linuxtv.org/mailinglists/linux-dvb/2002/06-2002/msg00178.html
>  
> I tried with spin_lock_irqsave(&xxx,flags) and spin_unlock_irqrestore(&xxx,flags). Then also system halts.

These are safe bet. It means you are disabling interrupts properly
(after all, it would not work on UP, if you didn't).

> Why system is permanently hanging? What was the problem? Is their any OS problem?

Most probably you mislock the spin-lock somewhere. Compile the kernel
with spinlock debugging for UP and see what happens. I think you have to
tweak a define in linux/spinlock.h or asm/spinlock.h to get that.

> We are using following configuration:
>  
> P4 HT Processor, RealTech 8139 Network card, Redhat 9.0 Kernel version 2.4.20-8smp.

Please, use "vanilla" (means oficial kernel from ftp.kernel.org)  kernel
for development. RedHat is know to apply problematic patches from time
to time.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux