Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-06-05 Thread Christoph Hellwig
On Tue, Jun 04, 2024 at 09:05:03AM +0200, Hannes Reinecke wrote: > On 6/4/24 06:31, Christoph Hellwig wrote: >> On Mon, Jun 03, 2024 at 06:43:56AM +, Nitesh Shetty wrote: Also most block limits are in kb. Not that I really know why we are doing that, but is there a good reason to dev

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-06-04 Thread Hannes Reinecke
On 6/4/24 06:31, Christoph Hellwig wrote: On Mon, Jun 03, 2024 at 06:43:56AM +, Nitesh Shetty wrote: 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

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-06-03 Thread Christoph Hellwig
On Mon, Jun 03, 2024 at 06:43:56AM +, Nitesh Shetty wrote: >> 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

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-06-03 Thread Nitesh Shetty
On 01/06/24 07:53AM, Christoph Hellwig wrote: On Mon, May 20, 2024 at 03:50:14PM +0530, Nitesh Shetty wrote: Add device limits as sysfs entries, - copy_max_bytes (RW) - copy_max_hw_bytes (RO) Above limits help to split the copy payload in block layer. copy_max_bytes: maximum tot

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-31 Thread Christoph Hellwig
On Mon, May 20, 2024 at 03:50:14PM +0530, Nitesh Shetty wrote: > Add device limits as sysfs entries, > - copy_max_bytes (RW) > - copy_max_hw_bytes (RO) > > Above limits help to split the copy payload in block layer. > copy_max_bytes: maximum total length of copy in single payload. > co

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-23 Thread Nitesh Shetty
On 22/05/24 10:49AM, Bart Van Assche wrote: On 5/21/24 07:25, Nitesh Shetty wrote: On 20/05/24 03:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: +    if (max_copy_bytes & (queue_logical_block_size(q) - 1)) +    return -EINVAL; Wouldn't it be more user-friendly if thi

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-22 Thread Bart Van Assche
On 5/21/24 07:25, Nitesh Shetty wrote: On 20/05/24 03:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: +    if (max_copy_bytes & (queue_logical_block_size(q) - 1)) +    return -EINVAL; Wouldn't it be more user-friendly if this check would be left out? Does any code depe

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-21 Thread Nitesh Shetty
On 20/05/24 04:33PM, Damien Le Moal wrote: On 2024/05/20 12:20, Nitesh Shetty wrote: @@ -231,10 +237,11 @@ int blk_set_default_limits(struct queue_limits *lim) { /* * Most defaults are set by capping the bounds in blk_validate_limits, -* but max_user_discard_sectors is

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-21 Thread Nitesh Shetty
On 20/05/24 03:42PM, Bart Van Assche wrote: On 5/20/24 03:20, Nitesh Shetty wrote: +static ssize_t queue_copy_max_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%llu\n", (unsigned long long) + q->limits.max_copy_sectors << SECTOR_SHIFT); +} + +sta

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-20 Thread Hannes Reinecke
On 5/20/24 12:20, Nitesh Shetty wrote: Add device limits as sysfs entries, - copy_max_bytes (RW) - copy_max_hw_bytes (RO) Above limits help to split the copy payload in block layer. copy_max_bytes: maximum total length of copy in single payload. copy_max_hw_bytes: Reflects the de

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-20 Thread Bart Van Assche
On 5/20/24 03:20, Nitesh Shetty wrote: +static ssize_t queue_copy_max_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%llu\n", (unsigned long long) + q->limits.max_copy_sectors << SECTOR_SHIFT); +} + +static ssize_t queue_copy_max_store(struct reque

Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-20 Thread Damien Le Moal
On 2024/05/20 12:20, Nitesh Shetty wrote: > Add device limits as sysfs entries, > - copy_max_bytes (RW) > - copy_max_hw_bytes (RO) > > Above limits help to split the copy payload in block layer. > copy_max_bytes: maximum total length of copy in single payload. > copy_max_hw_bytes: Refl

[PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support

2024-05-20 Thread Nitesh Shetty
Add device limits as sysfs entries, - copy_max_bytes (RW) - copy_max_hw_bytes (RO) Above limits help to split the copy payload in block layer. copy_max_bytes: maximum total length of copy in single payload. copy_max_hw_bytes: Reflects the device supported maximum limit. Signed-off