Conversation
|
In the Allow API, there are three things that can be tracked either at compile time (via
This PR's design makes the following choices for those options:
I was curious whether a different set of choices would be better, so I put together some benchmarks in the design-explorations repository: tock/design-explorations#5 Unfortunately, the results currently are giving us a painful tradeoff: the API is way better if we track whether the buffer is shared at runtime, but that generates 20%-80% more code for the allow calls. There might be a way to produce a nice API where the mechanism that tracks whether the buffer is allowed (+ the allow type) is configurable by the user, but I might be out of time for this particular benchmarking/design project. |
|
I had time to do some more benchmarking today, and got more promising results. I created a MUCH larger benchmark example (one that performs 100 read-only allow calls and 100 read-write allow calls with different IDs and lengths), as well as a "fully dynamic" API, which makes the following choices:
and this API was competitive with the "don't track whether the buffer is shared" API. It's slightly more efficient on RISC-V, and somewhat less efficient or ARM, but it the differences are within the range of noise in my benchmarks. As a result, I think we can select based on the API we want. I think the API we want looks like the API in |
|
Hey, this is a lot of good work. I tried to help by adding an initial design for such a handler in the
and tries to reuse some of the existing "fully dynamic" code to save some code size. The draft can be found here jrvanwhy/design-explorations#1. |
|
Hey @DanutAldea @jrvanwhy, is there any progress on this topic? |
|
The latest progress is at tock/design-explorations#6; to my knowledge there hasn't been any progress since then. |
|
Hi, @GustawB! I have not made any progress on this issue. |
This pull request adds the initial design idea for an
async-compatible allow mechanism. This includes:AllowRwBufferstructure to be used in asynchronous functionSyscallstrait to use the new allow interface