Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c
Michael Ellerman
mpe at ellerman.id.au
Wed Aug 14 22:20:55 AEST 2024
Niklas Cassel <cassel at kernel.org> writes:
> On Tue, Aug 13, 2024 at 10:32:36PM +1000, Michael Ellerman wrote:
>> Niklas Cassel <cassel at kernel.org> writes:
>> > On Tue, Aug 13, 2024 at 07:49:34AM +0200, Jonáš Vidra wrote:
...
>> >> ------------[ cut here ]------------
>> >> kernel BUG at drivers/ata/pata_macio.c:544!
>> >
>> > https://github.com/torvalds/linux/blob/v6.11-rc3/drivers/ata/pata_macio.c#L544
>> >
>> > It seems that the
>> > while (sg_len) loop does not play nice with the new .max_segment_size.
>>
>> Right, but only for 4KB kernels for some reason. Is there some limit
>> elsewhere that prevents the bug tripping on 64KB kernels, or is it just
>> luck that no one has hit it?
>
> Have your tried running fio (flexible I/O tester), with reads with a very
> large block sizes?
>
> I would be surprised if it isn't possible to trigger the same bug with
> 64K page size.
>
> max segment size = 64K
> MAX_DCMDS = 256
> 256 * 64K = 16 MiB
> What happens if you run fio with a 16 MiB blocksize?
>
> Something like:
> $ sudo fio --name=test --filename=/dev/sdX --direct=1 --runtime=60 --ioengine=io_uring --rw=read --iodepth=4 --bs=16M
Nothing interesting happens, fio succeeds.
The largest request that comes into pata_macio_qc_prep() is 1280KB,
which results in 40 DMA list entries.
I tried with a larger block size but it doesn't change anything. I guess
there's some limit somewhere else in the stack?
That was testing on qemu, but I don't think it should matter?
I guess there's no way to run the fio test against a file, ie. without a
raw partition? My real G5 doesn't have any spare disks/partitions in it.
cheers
fio-3.37
Starting 1 process
test: (groupid=0, jobs=1): err= 0: pid=257: Wed Aug 14 22:18:59 2024
read: IOPS=6, BW=195MiB/s (204MB/s)(96.0MiB/493msec)
slat (usec): min=32973, max=35222, avg=33836.35, stdev=1212.51
clat (msec): min=378, max=448, avg=413.35, stdev=34.99
lat (msec): min=413, max=481, avg=447.19, stdev=33.87
clat percentiles (msec):
| 1.00th=[ 380], 5.00th=[ 380], 10.00th=[ 380], 20.00th=[ 380],
| 30.00th=[ 380], 40.00th=[ 414], 50.00th=[ 414], 60.00th=[ 414],
| 70.00th=[ 447], 80.00th=[ 447], 90.00th=[ 447], 95.00th=[ 447],
| 99.00th=[ 447], 99.50th=[ 447], 99.90th=[ 447], 99.95th=[ 447],
| 99.99th=[ 447]
bw ( KiB/s): min=195047, max=195047, per=97.82%, avg=195047.00, stdev= 0.00, samples=1
iops : min= 5, max= 5, avg= 5.00, stdev= 0.00, samples=1
lat (msec) : 500=100.00%
cpu : usr=1.62%, sys=11.97%, ctx=22, majf=0, minf=1540
IO depths : 1=33.3%, 2=66.7%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=3,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=4
Run status group 0 (all jobs):
READ: bw=195MiB/s (204MB/s), 195MiB/s-195MiB/s (204MB/s-204MB/s), io=96.0MiB (101MB), run=493-493msec
Disk stats (read/write):
sda: ios=78/0, sectors=196608/0, merge=0/0, ticks=745/0, in_queue=745, util=66.89%
More information about the Linuxppc-dev
mailing list