From: Niklas Cassel <cassel@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Kolbjørn Barmen" <linux-ppc@kolla.no>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-ide@vger.kernel.org, "Jonáš Vidra" <vidra@ufal.mff.cuni.cz>,
"Christoph Hellwig" <hch@lst.de>,
linux@roeck-us.net
Subject: Re: Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c
Date: Wed, 14 Aug 2024 16:06:42 +0200 [thread overview]
Message-ID: <Zry58qB80V80uS38@ryzen.lan> (raw)
In-Reply-To: <87jzgj1ejc.fsf@mail.lhotse>
On Wed, Aug 14, 2024 at 10:20:55PM +1000, Michael Ellerman wrote:
> Niklas Cassel <cassel@kernel.org> writes:
> > On Tue, Aug 13, 2024 at 10:32:36PM +1000, Michael Ellerman wrote:
> >> Niklas Cassel <cassel@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.
You can definitely run fio against a file.
e.g.
$ dd if=/dev/random of=/tmp/my_file bs=1M count=1024
$ sudo fio --name=test --filename=/tmp/my_file --direct=1 --runtime=60 --ioengine=io_uring --rw=read --iodepth=4 --bs=16M
Perhaps try with 32M block size, so that it is larger than
max segment size = 64K
MAX_DCMDS = 256
256 * 64K = 16 MiB
Perhaps also try with and without --direct.
It could be interesting to use the page cache if you do --rw=readwrite
that might possibly result in larger bios.
Kind regards,
Niklas
next prev parent reply other threads:[~2024-08-14 14:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <62d248bb-e97a-25d2-bcf2-9160c518cae5@kolla.no>
2024-08-13 5:49 ` Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c Jonáš Vidra
2024-08-13 9:54 ` Niklas Cassel
2024-08-13 9:58 ` Jonáš Vidra
2024-08-13 12:32 ` Michael Ellerman
2024-08-13 14:33 ` Kolbjørn Barmen
2024-08-13 14:59 ` Niklas Cassel
2024-08-14 12:20 ` Michael Ellerman
2024-08-14 14:06 ` Niklas Cassel [this message]
2024-08-16 23:46 ` Michael Ellerman
2024-08-17 3:32 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zry58qB80V80uS38@ryzen.lan \
--to=cassel@kernel.org \
--cc=hch@lst.de \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppc@kolla.no \
--cc=linux@roeck-us.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=vidra@ufal.mff.cuni.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox