Skip to content

Are multiple releases of a grant with partial data possible? #124

@hvraven

Description

@hvraven

I have a project where I use a bbqueue to queue data for UART transmit. Several produces shove data into the queue and a single consumer hands the data over to the DMA engine.

The problem I am facing is that if I have a lot of data in the buffer (and a simple approach) the read grants become large. This creates large requests to the DMA engine which take a long time to finish. In the meantime the complete read grant is blocked, even though we could start reusing data as soon as the DMA engine has transmitted it. The current work around is to limit the size of the read grant, but that comes at the cost of reduced DMA efficiency.

A relatively simple optimisation would be to periodically read the status of the DMA engine and release the amount of bytes already transferred. However release() consumes self. Is it fundamentally possible to perform multiple release operations, or would this break part of the internal logic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions