Skip to contentSkip to conversation

block: Introduce queue limits and sysfs for copy-offload support

PATCH Christoph Hellwig 2 participants 3 messages Jun 4, 2024 – Jun 5, 2024

Subsystems (5)
lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw
Quoted 5 lines · Nitesh Shetty
Quoted 3 lines

Also most block limits are in kb. Not that I really know why we are doing that, but is there a good reason to deviate from that scheme?

We followed discard as a reference, but we can move to kb, if that helps with overall readability.

I'm not really sure what is better. Does anyone remember why we did the _kb version? Either way some amount of consistency would be nice.

#1 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 5 lines · Nitesh Shetty
Quoted 3 lines

Also most block limits are in kb. Not that I really know why we are doing that, but is there a good reason to deviate from that scheme?

We followed discard as a reference, but we can move to kb, if that helps with overall readability.

I'm not really sure what is better. Does anyone remember why we did the _kb version? Either way some amount of consistency would be nice.

If memory serves correctly we introduced the _kb versions as a convenience to the user; exposing values in 512 bytes increments tended to be confusing, especially when it comes to LBA values (is the size in units of hardware sector size? 512 increments? kilobytes?)

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke                  Kernel Storage Architect
[email protected]                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
author maintainer
#2 lore raw
Quoted 8 lines · Hannes Reinecke
Quoted 7 lines · Christoph Hellwig
Quoted 5 lines · Nitesh Shetty
Quoted 3 lines

Also most block limits are in kb. Not that I really know why we are doing that, but is there a good reason to deviate from that scheme?

We followed discard as a reference, but we can move to kb, if that helps with overall readability.

Quoted 7 lines
Quoted 3 lines

I'm not really sure what is better. Does anyone remember why we did the _kb version? Either way some amount of consistency would be nice.

If memory serves correctly we introduced the _kb versions as a convenience to the user; exposing values in 512 bytes increments tended
to be confusing, especially when it comes to LBA values (is the size in units of hardware sector size? 512 increments? kilobytes?)

Maybe. In the meantime I did a bit more of research, and only max_sectors and max_hw_sectors are reported in kb. chunk_sectors is reported in 512 byte sectors, and everything else is reported in bytes.

So sticking to bytes is probably right, and I was wrong about "most block limits above". Sorry.