Re: [RFC][CFT] GEOM direct dispatch and fine-grained CAM locking

2013-10-02 Thread John Baldwin
On Saturday, September 07, 2013 2:32:45 am Alexander Motin wrote:
> On 07.09.2013 02:02, Jeremie Le Hen wrote:
> > On Fri, Sep 06, 2013 at 11:29:11AM +0300, Alexander Motin wrote:
> >> On 06.09.2013 11:06, Jeremie Le Hen wrote:
> >>> On Fri, Sep 06, 2013 at 12:46:27AM +0200, Olivier Cochard-Labbé wrote:
>  On Thu, Sep 5, 2013 at 11:38 PM, Alexander Motin  
wrote:
> > I've found and fixed possible double request completion, that could 
cause
> > such symptoms if happened. Updated patch located as usual:
> > http://people.freebsd.org/~mav/camlock_patches/camlock_20130905.patch
> >
> >>> With this new one I cannot boot any more (I also updated the source
> >>> tree).  This is a hand transcripted version:
> >>>
> >>> Trying to mount root from zfs:zroot/root []...
> >>> panic: Batch flag already set
> >>> cpuid = 1
> >>> KDB: stack backtrace:
> >>> db_trace_self_wrapper()
> >>> kdb_backtrace()
> >>> vpanic()
> >>> kassert_panic()
> >>> xpt_batch_start()
> >>> ata_interrupt()
> >>> softclock_call_cc()
> >>> softclock()
> >>> ithread_loop()
> >>> fork_exit()
> >>> fork_trampoline()
> >>
> >> Thank you for the report. I see my fault. It is probably specific to
> >> ata(4) driver only. I've workarounded that in new patch version, but
> >> probably that area needs some rethinking.
> >>
> >> http://people.freebsd.org/~mav/camlock_patches/camlock_20130906.patch
> >
> > I'm not sure you needed a confirmation, but it boots.  Thanks :).
> >
> > I didn't quite understand the thread; is direct dispatch enabled for
> > amd64?  ISTR you said only i386 but someone else posted the macro for
> > amd64.
> 
> Yes, it is enabled for amd64. I've said x86, meaning both i386 and amd64.

FYI, I tested mfi with this patch set and mfid worked fine for handling g_up
directly:

Index: dev/mfi/mfi_disk.c
===
--- dev/mfi/mfi_disk.c  (revision 257407)
+++ dev/mfi/mfi_disk.c  (working copy)
@@ -162,6 +162,7 @@
sc->ld_disk->d_unit = sc->ld_unit;
sc->ld_disk->d_sectorsize = secsize;
sc->ld_disk->d_mediasize = sectors * secsize;
+   sc->ld_disk->d_flags = DISKFLAG_DIRECT_COMPLETION;
if (sc->ld_disk->d_mediasize >= (1 * 1024 * 1024)) {
sc->ld_disk->d_fwheads = 255;
sc->ld_disk->d_fwsectors = 63;


-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: UFS related panic (daily <-> find)

2013-10-02 Thread John Baldwin
On Tuesday, October 01, 2013 9:15:33 pm rank1see...@gmail.com wrote:
> Ok, here is another one, same case, just this time under 9.1-RELEASE-p7
> 
> ==
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x25
> fault code  = supervisor read, page not present
> instruction pointer = 0x20:0xc082c552
> stack pointer   = 0x28:0xe7eed7a8
> frame pointer   = 0x28:0xe7eed7ac
> code segment= base 0x0, limit 0xf, type 0x1b
> = DPL 0, pres 1, def32 1, gran 1
> processor eflags= interrupt enabled, resume, IOPL = 0
> current process = 63645 (find)
> trap number = 12
> panic: page fault
> Uptime: 11h16m47s
> Physical memory: 1014 MB
> Dumping 143 MB: 128 112 96 80 64 48 32 16
> 
> #6  0xc0898d4c in calltrap () at /usr/src/sys/i386/i386/exception.s:169
> #7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" is not 
> available.
> )
> at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073

Please go to frame 7 and do 'x/i $rip'.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: UFS related panic (daily <-> find)

2013-10-02 Thread rank1seeker
> > Ok, here is another one, same case, just this time under 9.1-RELEASE-p7
> > 
> > ==
> > Fatal trap 12: page fault while in kernel mode
> > fault virtual address   = 0x25
> > fault code  = supervisor read, page not present
> > instruction pointer = 0x20:0xc082c552
> > stack pointer   = 0x28:0xe7eed7a8
> > frame pointer   = 0x28:0xe7eed7ac
> > code segment= base 0x0, limit 0xf, type 0x1b
> > = DPL 0, pres 1, def32 1, gran 1
> > processor eflags= interrupt enabled, resume, IOPL = 0
> > current process = 63645 (find)
> > trap number = 12
> > panic: page fault
> > Uptime: 11h16m47s
> > Physical memory: 1014 MB
> > Dumping 143 MB: 128 112 96 80 64 48 32 16
> > 
> > #6  0xc0898d4c in calltrap () at /usr/src/sys/i386/i386/exception.s:169
> > #7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" is 
not 
> > available.
> > )
> > at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073
> 
> Please go to frame 7 and do 'x/i $rip'.
> 

(kgdb) up 7
#7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" is not 
available.
) at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073
2073/usr/src/sys/ufs/ffs/ffs_softdep.c: No such file or directory.
in /usr/src/sys/ufs/ffs/ffs_softdep.c
(kgdb) x/i $rip
Value can't be converted to integer.
(kgdb) x $rip
Value can't be converted to integer.
(kgdb) i $rip
Undefined info command: "$rip".  Try "help info".
(kgdb) x
0x0:Cannot access memory at address 0x0


I don't t think I understand  'x/i $rip' part ...


Domagoj
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: UFS related panic (daily <-> find)

2013-10-02 Thread John Baldwin
On Wednesday, October 02, 2013 4:32:56 pm rank1see...@gmail.com wrote:
> > > Ok, here is another one, same case, just this time under 9.1-RELEASE-p7
> > > 
> > > ==
> > > Fatal trap 12: page fault while in kernel mode
> > > fault virtual address   = 0x25
> > > fault code  = supervisor read, page not present
> > > instruction pointer = 0x20:0xc082c552
> > > stack pointer   = 0x28:0xe7eed7a8
> > > frame pointer   = 0x28:0xe7eed7ac
> > > code segment= base 0x0, limit 0xf, type 0x1b
> > > = DPL 0, pres 1, def32 1, gran 1
> > > processor eflags= interrupt enabled, resume, IOPL = 0
> > > current process = 63645 (find)
> > > trap number = 12
> > > panic: page fault
> > > Uptime: 11h16m47s
> > > Physical memory: 1014 MB
> > > Dumping 143 MB: 128 112 96 80 64 48 32 16
> > > 
> > > #6  0xc0898d4c in calltrap () at /usr/src/sys/i386/i386/exception.s:169
> > > #7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" is 
> not 
> > > available.
> > > )
> > > at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073
> > 
> > Please go to frame 7 and do 'x/i $rip'.
> > 
> 
> (kgdb) up 7
> #7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" is not 
> available.
> ) at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073
> 2073/usr/src/sys/ufs/ffs/ffs_softdep.c: No such file or directory.
> in /usr/src/sys/ufs/ffs/ffs_softdep.c
> (kgdb) x/i $rip
> Value can't be converted to integer.

Oh, this is i386, use "$eip" instead of "$rip", so 'x/i $eip' at frame 7.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: UFS related panic (daily <-> find)

2013-10-02 Thread rank1seeker
> > > > Ok, here is another one, same case, just this time under 
9.1-RELEASE-p7
> > > > 
> > > > ==
> > > > Fatal trap 12: page fault while in kernel mode
> > > > fault virtual address   = 0x25
> > > > fault code  = supervisor read, page not present
> > > > instruction pointer = 0x20:0xc082c552
> > > > stack pointer   = 0x28:0xe7eed7a8
> > > > frame pointer   = 0x28:0xe7eed7ac
> > > > code segment= base 0x0, limit 0xf, type 0x1b
> > > > = DPL 0, pres 1, def32 1, gran 1
> > > > processor eflags= interrupt enabled, resume, IOPL = 0
> > > > current process = 63645 (find)
> > > > trap number = 12
> > > > panic: page fault
> > > > Uptime: 11h16m47s
> > > > Physical memory: 1014 MB
> > > > Dumping 143 MB: 128 112 96 80 64 48 32 16
> > > > 
> > > > #6  0xc0898d4c in calltrap () at 
/usr/src/sys/i386/i386/exception.s:169
> > > > #7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" 
is 
> > not 
> > > > available.
> > > > )
> > > > at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073
> > > 
> > > Please go to frame 7 and do 'x/i $rip'.
> > > 
> > 
> > (kgdb) up 7
> > #7  0xc082c552 in inodedep_find (inodedephd=Variable "inodedephd" is 
not 
> > available.
> > ) at /usr/src/sys/ufs/ffs/ffs_softdep.c:2073
> > 2073/usr/src/sys/ufs/ffs/ffs_softdep.c: No such file or directory.
> > in /usr/src/sys/ufs/ffs/ffs_softdep.c
> > (kgdb) x/i $rip
> > Value can't be converted to integer.
> 
> Oh, this is i386, use "$eip" instead of "$rip", so 'x/i $eip' at frame 7.


(kgdb) x/i $eip
0xc082c552 :  cmp%ecx,0x24(%eax)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"