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
> On Aug 25, 2024, at 1:49 PM, Taylor R Campbell <riastradh%NetBSD.org@localhost> wrote:
>
> Attached patch attempts to address the issue for x86.
Bounce buffer allocation (and resource allocation in general) is definitely something I’ve 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’t particularly like having to allocate the resources lazily, either, because it’s 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 “fine” modulo the memory cost issue. I’m 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