NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/58643: bus_dma(9) fails to bounce misaligned inputs requiring extra segments
The following reply was made to PR kern/58643; it has been noted by GNATS.
From: Jason Thorpe <thorpej%me.com@localhost>
To: Taylor Campbell <riastradh%NetBSD.org@localhost>
Cc: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%NetBSD.org@localhost>,
"netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%NetBSD.org@localhost>
Subject: Re: kern/58643: bus_dma(9) fails to bounce misaligned inputs
requiring extra segments
Date: Tue, 27 Aug 2024 06:37:02 -0700
> On Aug 25, 2024, at 1:49=E2=80=AFPM, Taylor R Campbell =
<riastradh%NetBSD.org@localhost> wrote:
>=20
> Attached patch attempts to address the issue for x86.
Bounce buffer allocation (and resource allocation in general) is =
definitely something I=E2=80=99ve never been totally happy with in =
bus_dma. It may be worth revisiting the issue entirely (resource =
exhaustion in IOMMU-having systems is a concern, too). But I don=E2=80=99=
t particularly like having to allocate the resources lazily, either, =
because it=E2=80=99s then possible to get into a situation where the I/O =
may never take place.
In any case, yah, your analysis is correct and your patch is =E2=80=9Cfine=
=E2=80=9D modulo the memory cost issue. I=E2=80=99m not particularly =
stoked to add another flag to opt in to the behavior, because really any =
driver that has this constraint needs this and the information is =
already available in the arguments used to create the map.
-- thorpej
Home |
Main Index |
Thread Index |
Old Index