Re: About sg_tablesize in 2.6 kernel

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

 



[note: you forgot to put in a link to your sourcecode, which greatly
reduces our ability to give you good answers; please fix this]
> 
> 1. In 2.6 kernel, even if I set the sg_tablesize to SG_NONE, the 
> mid-layer is still queuing commands with use_sg=1. There is no way to 
> disable this SG at all?

in 2.6 everything is now going via the ONE sg codepath yes. The dual
code path stuff was just incredibly fragile and a bad idea.



> address=page_address(sg[i].page) + sg[i].offset;
> 
> Is this the right way? I am assuming that sg[i].page will be mapped in 
> to kernel address space as this address is created by SCSI mid-layer. Is 
> that right? Or do I have to use kmap? I tried replacing page_address 
> with kmap/kunmap. But as soon as call kunmap to unmap, the kernal 
> panics! Any thoughts?

kmap doesn't take struct page as argument.

 but.... if you show us the real code we can give you better
suggestions.

> 
> 3. Do I have to disable bottom halves before calling scsi_done()? It 
> seems that the kernel panics when I call scsi_done if I use spin_lock 
> instead of spin_lock_bh(). This is one of my spin_locks created for 
> protecting a data structure.

you don't need any locks before calling the done method.

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux