Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xbd and large sectors
On Mon, 24 Jul 2023, Manuel Bouyer wrote:
> OK this is probaly because the domU tries an I/O smaller than 4k, or
> not aligned to 4k. The xbd driver should really report 4k block size and not
> 512.
>
> Please try the attached patch (or use binaries at
> ftp://asim.lip6.fr/outgoing/bouyer/rel/HEAD/amd64 which were built with the
> patch).
> I tested that it still works with a 512-bytes backend but I have to way to
> test 4k.
Uh, that (netbsd-INSTALL_XEN3_DOMU in PV mode) failed early. I don't have
much experience with ddb(4), please let me know if you need more details.
Thanks,
Christian.
Parsing config from /etc/xen/netbsd.cfg
[ 1.0000000] cpu_rng: rdrand
[ 1.0000000] entropy: ready
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
[ 1.0000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved.
[ 1.0000000] NetBSD 10.99.6 (INSTALL_XEN3_DOMU) #2: Mon Jul 24 12:35:11 CEST 2023
[ 1.0000000] bouyer@bip:/dsk/l1/misc/bouyer/tmp/amd64/obj/dsk/l1/misc/bouyer/HEAD/clean/src/sys/arch/amd64/compile/INSTALL_XEN3_DOMU
[ 1.0000000] total memory = 4096 MB
[ 1.0000000] avail memory = 3939 MB
[ 1.0000000] mainbus0 (root)
[ 1.0000000] hypervisor0 at mainbus0: Xen version 4.17.1
[ 1.0000000] vcpu0 at hypervisor0
[ 1.0000000] vcpu0: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu0: node 0, package 0, core 0, smt 0
[ 1.0000000] vcpu1 at hypervisor0
[ 1.0000000] vcpu1: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu1: node 0, package 0, core 0, smt 0
[ 1.0000000] vcpu2 at hypervisor0
[ 1.0000000] vcpu2: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu2: node 0, package 0, core 0, smt 0
[ 1.0000000] vcpu3 at hypervisor0
[ 1.0000000] vcpu3: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu3: node 0, package 0, core 0, smt 0
[ 1.0000000] xenbus0 at hypervisor0: Xen Virtual Bus Interface
[ 1.0000000] xencons0 at hypervisor0: Xen Virtual Console Driver
[ 1.0000000] event 2 bound to VCPU vcpu0 0
[ 1.1100519] event 1 bound to VCPU vcpu0 0
[ 1.1100519] xenbus0: can't get state for device/suspend/event-channel (2)
[ 1.1100519] xbd0 at xenbus0 id 51712: Xen Virtual Block Device Interface
[ 1.1200499] event 12 bound to VCPU vcpu2 2
[ 1.1200499] xbd1 at xenbus0 id 51728: Xen Virtual Block Device Interface
[ 1.1300547] event 13 bound to VCPU vcpu3 3
[ 1.1300547] xennet0 at xenbus0 id 0: Xen Virtual Network Interface
[ 1.1400572] xennet0: backend features 0x7<IPV6-CSUM,SG,RX-COPY>
[ 1.1400572] xennet0: MAC address 00:16:3e:ab:cd:06
[ 1.1400572] event 14 bound to VCPU vcpu1 1
[ 1.1400572] fatal integer divide fault in supervisor mode
[ 1.1500605] trap type 8 code 0 rip 0xffffffff80213569 cs 0xe030 rflags 0x10246 cr2 0 ilevel 0 rsp 0xffffa901386dde30
[ 1.1500605] curlwp 0xffffa90007f0fb80 pid 0.109 lowest kstack 0xffffa901386d92c0
kernel: integer divide fault trap, code=0
Stopped in pid 0.109 (system) at netbsd:xbd_backend_changed+0x2e2:
idivq %rcx,%rax
xbd_backend_changed() at netbsd:xbd_backend_changed+0x2e2
xenwatch_thread() at netbsd:xenwatch_thread+0xcf
ds 0
es 3
fs 0
gs c4a3
rdi ffffa90007e4b068
rsi 200000
rbp ffffa901386ddeb0
rbx ffffa90007e4b000
rdx 0
rcx 0
rax 200000
r8 0
r9 1000
r10 20
r11 ffffa901386ddb50
r12 4
r13 ffffa901386ddec0
r14 ffffa90007f0fb80
r15 0
rip ffffffff80213569 xbd_backend_changed+0x2e2
cs e030
rflags 10246
rsp ffffa901386dde30
ss e02b
netbsd:xbd_backend_changed+0x2e2: idivq %rcx,%rax
db{3}> dmesg
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
[ 1.0000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights rese
rved.
[ 1.0000000] NetBSD 10.99.6 (INSTALL_XEN3_DOMU) #2: Mon Jul 24 12:35:11 CEST 2
023
[ 1.0000000] bouyer@bip:/dsk/l1/misc/bouyer/tmp/amd64/obj/dsk/l1/misc/bouyer/
HEAD/clean/src/sys/arch/amd64/compile/INSTALL_XEN3_DOMU
[ 1.0000000] total memory = 4096 MB
[ 1.0000000] avail memory = 3939 MB
[ 1.0000000] timecounter: Timecounters tick every 10.000 msec
[ 1.0000000] Kernelized RAIDframe activated
[ 1.0000000] mainbus0 (root)
[ 1.0000000] hypervisor0 at mainbus0: Xen version 4.17.1
[ 1.0000000] hypervisor0: features: mmu_pt_update_preserve_ad highmem_assist
gnttab_map_avail_bits
[ 1.0000000] VIRQ_DEBUG interrupt using event channel 3
[ 1.0000000] vcpu0 at hypervisor0
[ 1.0000000] vcpu0: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu0: node 0, package 0, core 0, smt 0
[ 1.0000000] vcpu1 at hypervisor0
[ 1.0000000] vcpu1: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu1: node 0, package 0, core 0, smt 0
[ 1.0000000] vcpu2 at hypervisor0
[ 1.0000000] vcpu2: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu2: node 0, package 0, core 0, smt 0
[ 1.0000000] vcpu3 at hypervisor0
[ 1.0000000] vcpu3: Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz, id 0x306c3
[ 1.0000000] vcpu3: node 0, package 0, core 0, smt 0
[ 1.0000000] xenbus0 at hypervisor0: Xen Virtual Bus Interface
[ 1.0000000] xencons0 at hypervisor0: Xen Virtual Console Driver
[ 1.0000000] xencons0: console major 143, unit 0
[ 1.0000000] event 2 bound to VCPU vcpu0 0
[ 1.0000000] xencons0: using event channel 2
[ 1.0000000] timecounter: Timecounter "xen_system_time" frequency 1000000000 H
z quality 10000
[ 1.0000030] Xen vcpu0 clock: using event channel 5
[ 1.0000030] timecounter: Timecounter "clockinterrupt" frequency 100 Hz qualit
y 0
[ 1.1000539] Xen vcpu1 clock: using event channel 7
[ 1.1000539] Xen vcpu2 clock: using event channel 9
[ 1.1000539] Xen vcpu3 clock: using event channel 11
[ 1.1100519] event 1 bound to VCPU vcpu0 0
[ 1.1100519] xenbus0: using event channel 1
[ 1.1100519] xenbus0: autoconfiguration error: can't get state for device/susp
end/event-channel (2)
[ 1.1100519] IPsec: Initialized Security Association Processing.
[ 1.1100519] xbd0 at xenbus0 id 51712: Xen Virtual Block Device Interface
[ 1.1200499] xbd0: using event channel 12
[ 1.1200499] event 12 bound to VCPU vcpu2 2
[ 1.1200499] xbd1 at xenbus0 id 51728: Xen Virtual Block Device Interface
[ 1.1300547] xbd1: using event channel 13
[ 1.1300547] event 13 bound to VCPU vcpu3 3
[ 1.1300547] xennet0 at xenbus0 id 0: Xen Virtual Network Interface
[ 1.1400572] xennet0: backend features 0x7<IPV6-CSUM,SG,RX-COPY>
[ 1.1400572] xennet0: MAC address 00:16:3e:ab:cd:06
[ 1.1400572] xennet0: using event channel 14
[ 1.1400572] event 14 bound to VCPU vcpu1 1
[ 1.1400572] fatal integer divide fault in supervisor mode
[ 1.1500605] trap type 8 code 0 rip 0xffffffff80213569 cs 0xe030 rflags 0x1024
6 cr2 0 ilevel 0 rsp 0xffffa901386dde30
[ 1.1500605] curlwp 0xffffa90007f0fb80 pid 0.109 lowest kstack 0xffffa901386d9
2c0
db{3}> ps
PID LID S CPU FLAGS STRUCT LWP * NAME WAIT
1 1 3 1 0 ffffa900089359c0 init lbolt
0 125 3 2 200 ffffa900089bf180 npfgc0 npfgcw
0 124 3 1 200 ffffa90008935580 rt_free rt_free
0 123 3 3 200 ffffa90008935140 unpgc unpgc
0 122 3 2 200 ffffa90008931980 key_timehandler key_timehandler
0 121 3 3 200 ffffa90008931540 icmp6_wqinput/3 icmp6_wqinput
0 120 3 2 200 ffffa90008931100 icmp6_wqinput/2 icmp6_wqinput
0 119 3 1 200 ffffa9000892d940 icmp6_wqinput/1 icmp6_wqinput
0 118 3 0 200 ffffa9000892d500 icmp6_wqinput/0 icmp6_wqinput
0 117 3 1 200 ffffa9000892d0c0 nd6_timer nd6_timer
0 116 3 3 200 ffffa9000891c900 icmp_wqinput/3 icmp_wqinput
0 115 3 2 200 ffffa9000891c4c0 icmp_wqinput/2 icmp_wqinput
0 114 3 1 200 ffffa9000891c080 icmp_wqinput/1 icmp_wqinput
0 113 3 0 200 ffffa900089078c0 icmp_wqinput/0 icmp_wqinput
0 112 3 1 200 ffffa90008907480 rt_timer rt_timer
0 111 3 0 200 ffffa90008907040 vmem_rehash vmem_rehash
0 110 3 2 200 ffffa90007f13bc0 xenbus
0 > 109 7 3 200 ffffa90007f0fb80 xenwatch
0 100 3 0 200 ffffa90007f0f300 entbutler entropy
0 99 3 1 200 ffffa90007f08b40 xenbus_probe rplq
0 98 3 3 200 ffffa90007f08700 xcall/3 xcall
0 97 1 3 200 ffffa90007f082c0 softser/3
0 96 1 3 200 ffffa90007f07b00 softclk/3
0 30 1 3 200 ffffa90007f076c0 softbio/3
0 29 1 3 200 ffffa90007f07280 softnet/3
0 28 1 3 201 ffffa90007f02ac0 idle/3
0 27 3 2 200 ffffa90007f02680 xcall/2 xcall
0 26 1 2 200 ffffa90007f02240 softser/2
0 25 1 2 200 ffffa90007f01a80 softclk/2
0 24 1 2 200 ffffa90007f01640 softbio/2
0 23 1 2 200 ffffa90007f01200 softnet/2
0 > 22 1 2 201 ffffa90007efea40 idle/2
0 21 3 1 200 ffffa90007efe600 xcall/1 xcall
0 20 1 1 200 ffffa90007efe1c0 softser/1
0 19 1 1 200 ffffa90007efca00 softclk/1
0 18 1 1 200 ffffa90007efc5c0 softbio/1
0 17 1 1 200 ffffa90007efc180 softnet/1
0 > 16 1 1 201 ffffa90007ee99c0 idle/1
0 15 3 0 200 ffffa90007ee9580 pmfsuspend pmfsuspend
0 14 3 0 200 ffffa90007ee9140 pmfevent pmfevent
0 13 3 0 200 ffffa90007ee4980 sopendfree sopendfr
0 12 3 3 200 ffffa90007ee4540 ifwdog ifwdog
0 11 3 1 200 ffffa90007ee4100 iflnkst iflnkst
0 10 3 0 200 ffffa90007ed9940 nfssilly nfssilly
0 9 3 0 200 ffffa90007ed9500 vdrain vdrain
0 8 3 0 200 ffffa90007ed90c0 modunload mod_unld
0 7 3 0 200 ffffa90007bc1900 xcall/0 xcall
0 6 1 0 200 ffffa90007bc14c0 softser/0
0 5 1 0 200 ffffa90007bc1080 softclk/0
0 4 1 0 200 ffffa90007bbe8c0 softbio/0
0 3 1 0 200 ffffa90007bbe480 softnet/0
0 > 2 1 0 201 ffffa90007bbe040 idle/0
0 0 3 0 200 ffffffff80c9bac0 swapper cfgmisc
db{3}> show all callout
hardclock_ticks now: 15
ticks wheel arg func
17 0/32 0 pffasttimo
47 0/62 0 tcp_slowtimo
47 0/62 0 pfslowtimo
96 0/111 ffffa90007f0f300 sleepq_timeout
96 0/111 0 rt_timer_timer
96 0/111 0 nd6_timer
96 0/111 0 key_timehandler
98 0/113 ffffffff80c9bac0 sleepq_timeout
996 1/259 0 vmem_rehash_all_kick
997 1/259 ffffa900089bf180 sleepq_timeout
29985 1/373 0 cache_update_stats
359996 2/517 0 nd6_slowtimo
db{3}> show buf
vp 0x4000019888b83ff lblkno 0x8348fffffcb8e900 blkno 0xbe09e2c148000019 rawblk
no 0x987d8d4800000009 dev 0xc0bb8b00
error 1275083154 flags 0xfffdefaf<AGE,ASYNC,BAD,DELWRI,DONE,COWDONE,INVAL,LOCK
ED,NOCACHE,PHYS,RAW,READ,DEVPRIVATE,VFLUSH,MEDIA_FUA,MEDIA_DPO>
bufsize 0x195883 bcount 0x100 resid 0x4c18638d
data 0x60938b48ffff2510 saveaddr 0x4800001970838b4c
iodone 0x3ee8df8948002e87 objlock 0x70e902e983ab66ff
>
> The patch assumes that b_rawblkno is in DEV_BSIZE units, and that the backend
> wants sector_number in XEN_BSIZE units (which happens to be the same as
> DEV_BSIZE), but I may have misread the linux sources.
>
> --
> Manuel Bouyer <bouyer%antioche.eu.org@localhost>
> NetBSD: 26 ans d'experience feront toujours la difference
> --
>
--
BOFH excuse #430:
Mouse has out-of-cheese-error
Home |
Main Index |
Thread Index |
Old Index