Re: [PATCH] Add locking to twe(4) so it no longer uses Giant

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 09 Aug 2012 13:21:29 -0400
On 8/9/12 10:31 AM, Mike Tancsa wrote:
> On 8/9/2012 9:16 AM, John Baldwin wrote:
>>> One more data point, /dev/twe0 does not exist with the patch and I think
>>> thats why the utils fail outright.
>>
>> Oh, hmm.  That's odd.  Do you get any error messages on the console
>> when twe0 attaches?  Also, you have INVARIANTS enabled, yes?
>> (make_dev() panics when it fails if INVARIANTS is enabled).
> 
> I have INVARIANTS in the kernel, sorry, do I need to do something to
> make it active ?
> 
> 0{offsite2}# sysctl -a | grep -i invar
> kern.features.invariant_support: 1
> options INVARIANT_SUPPORT
> options INVARIANTS
> kern.timecounter.invariant_tsc: 1
>   TSC: P-state invariant, performance statistics
>   TSC: P-state invariant, performance statistics
>   TSC: P-state invariant, performance statistics
>   TSC: P-state invariant, performance statistics
> 0{offsite2}#
> 
> Nothing odd in dmesg
> 
> ZFS filesystem version 5
> ZFS storage pool version 28
> Timecounters tick every 1.000 msec
> twed0 on twe0
> twed0: 953878MB (1953542144 sectors)
> usbus0: 480Mbps High Speed USB v2.0
> usbus1: 480Mbps High Speed USB v2.0
> 
> 
> pci6: <ACPI PCI bus> on pcib6
> twe0: <3ware Storage Controller. Driver version 1.50.01.002> port
> 0x2000-0x200f mem 0xe2810000-0xe281000f,0xe2000000-0xe
> 27fffff at device 0.0 on pci6
> twe0: 2 ports, Firmware FE8S 1.05.00.068, BIOS BE7X 1.08.00.048
> isab0: <PCI-ISA bridge> at device 31.0 on pci0
> 
> 
> Patch below is causing a panic now on boot. Just going to add debugging
> to the serial console to see what it is.... and
> 
> 0{offsite2}# kldload twe
> twe0: <3ware Storage Controller. Driver version 1.50.01.002> port
> 0x2000-0x200f mem 0xe2810000-0xe281000f,0xe2000000-0xe27fffff at device
> 0.0 on pci6
> twe0: [GIANT-LOCKED]

Odd, the patched driver shouldn't be triggering this message.

> Fatal trap 12: page fault while in kernel mode
> cpuid = 4; apic id = 04
> fault virtual address   = 0x3
> fault code              = supervisor read data, page not present
> instruction pointer     = 0x20:0xffffffff81813eb3
> stack pointer           = 0x28:0xffffff84529d33f0
> frame pointer           = 0x28:0xffffff84529d3430
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, long 1, def32 0, gran 1
> processor eflags        = interrupt enabled, resume, IOPL = 0
> current process         = 1324 (kldload)
> [ thread pid 1324 tid 100146 ]
> Stopped at      twe_setup+0x153:        movzbl  0x3(%rdx),%eax
> db>

Humm, I wonder if this module has a mix of old and new .o files somehow?
Perhaps try rebuilding twe.ko from scratch after doing a 'make clean'?

-- 
John Baldwin
Received on Thu Aug 09 2012 - 15:21:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC