acpki: Zero out request_data
#469
Reference in New Issue
Block a user
Delete Branch ":zero-request-data"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See #466 (comment).
Interesting. The block you pointed out is exactly why I thought it was okay not to clean the data; but obviously it's not covering the whole transfer - we're again dealing with 32-bit chunks of data, which gets transferred 64 bits at a time.
To decrease the overhead would it be feasible to clear the data up to the nearest 64 bit boundary? That would be either 0 or 1 extra clear.
Is that actually faster? Tests are not free either, especially since they may involve a jump that can be mispredicted and cause CPU pipeline flushes.
Both of these approaches assumedly have one mispredicted branch, as
.fill(0)will also have to loop over the array? I guess I could rearrange this so we do aOUT_BUFFER.transactions[0].request_data[(data.len() - 1) | 1] = 0;before thecopy_from_slice? I'm not really sure how best to benchmark this — the RTIO dispatch still dominates this function after all!This all said, I do also wonder if there should be a bounds check at the start of all the
output_widemethods, as currently writing an array >16 will panic the kernel.If there is no noticeable performance improvement, then the simplest code is better.
Yeah let's keep it simple for the wide fn, the single function will do fine with a single extra fill w/o checks.