[PATCH] AMD GCN: Implement circular buffering.
Andrew Stubbs
ams@codesourcery.com
Mon Mar 18 16:18:00 GMT 2019
The GCN port outputs stdout and stderr via a shared-memory interface.
Previously the buffer was limited to 1000 write operations, which was enough
for testing purposes, but easy to exhaust.
This patch implements a new circular buffering system allowing a greater
amount of output. The interface must allow hundreds of hardware threads to
output simultaneously. The new limit is UINT32_MAX write operations.
Unfortunately, there's no way to tell if the host side has also been updated.
This code will misbehave unless the gcn-run from GCC is also updated (although
it's fine the other way around), but that patch has already been committed.
OK?
Andrew Stubbs
Mentor Graphics / CodeSourcery
---
newlib/libc/sys/amdgcn/write.c | 55 +++++++++++++++++++++++-----------
1 file changed, 38 insertions(+), 17 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AMD-GCN-Implement-circular-buffering.patch
Type: text/x-patch
Size: 3046 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20190318/7ea199ce/attachment.bin>
More information about the Newlib
mailing list