Page MenuHomeFreeBSD

nvme: Convert adjacent bools to a bitfield
AbandonedPublic

Authored by imp on Aug 3 2023, 10:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 4 2024, 7:33 AM
Unknown Object (File)
Oct 4 2024, 4:16 AM
Unknown Object (File)
Oct 2 2024, 10:29 PM
Unknown Object (File)
Oct 2 2024, 8:30 PM
Unknown Object (File)
Oct 1 2024, 1:27 PM
Unknown Object (File)
Sep 28 2024, 7:24 AM
Unknown Object (File)
Sep 27 2024, 5:42 AM
Unknown Object (File)
Sep 26 2024, 10:15 PM
Subscribers

Details

Reviewers
jhb
mav
chuck
chs
Summary

Neither timeout (meaning this request is allowed to timeout), nor
payload_valid (meaning this request has a memdesc that's good) are set
in a way that race anything (these are set during initializaiton and then
only tested).

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 52971
Build 49862: arc lint + arc unit

Event Timeline

imp requested review of this revision.Aug 3 2023, 10:41 PM

I suppose it may not save anything on 64-bit platforms due to alignment.

I kind of doubt this makes a difference due to padding (I suspect you have padding here both before and after if you check ptype /o in GDB). Probably there's a hole after retries that you could move these two down into that might remove some padding making the structure smaller.

This revision is now accepted and ready to land.Aug 5 2023, 12:13 AM
In D41312#941078, @jhb wrote:

I kind of doubt this makes a difference due to padding (I suspect you have padding here both before and after if you check ptype /o in GDB). Probably there's a hole after retries that you could move these two down into that might remove some padding making the structure smaller.

This has more to do with wanting more booleans... but I suppose that there's a total of 8 before we overflow so maybe I should just abandon this...

If you are looking to add more flag values, I'd move this to after retries and change the type to uint32_t or uint16_t if you think more might be needed in the future.

If you are looking to add more flag values, I'd move this to after retries and change the type to uint32_t or uint16_t if you think more might be needed in the future.

I've dropped this, and likely will move the bools to a 64-bit slot and make it be an array of 8 - #used-booleans to be explicit about padding.