All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mmc: Improve block layer requeueing behavior
@ 2022-10-26  7:30 Christian Löhle
  2022-11-18 10:47 ` Adrian Hunter
  0 siblings, 1 reply; 9+ messages in thread
From: Christian Löhle @ 2022-10-26  7:30 UTC (permalink / raw)
  To: axboe, ulf.hansson, linux-mmc, linux-kernel, linux-block
  Cc: Avri Altman, adrian.hunter, vincent.whitchurch, Christian Löhle

Mmcblk relies on block layer requeueing to fulfill some requests under
certain conditions. Improve the handling to get nicely ordered requests.

Using the terms a bit loosely to get a point across:
Current behavior for 512 blksz and max_blk_count = 1 the scenario would
be as follows:

- request for page 0 lba 0 to 7
- request for page 1 lba 8 to 15
- request for page 2 lba 16 to 23
- request for page 3 lba 24 to 31

mmcblk modifies data->blocks = 1 for each and requeues,
this leads to:

Access lba 0
Access lba 8
Access lba 16
Access lba 24
Access lba 1 (1. Requeue for page 0)
Access lba 9 (1. Requeue for page 1)
Access lba 17 (1. Requeue for page 2)
Access lba 25 (1. Requeue for page 3)
Access lba 2 (2. Requeue for page 0)
...

Of course we would rather have lbas consecutive.
Hyperstone GmbH | Reichenaustr. 39a  | 78467 Konstanz
Managing Director: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-10-26  7:30 [PATCH 0/3] mmc: Improve block layer requeueing behavior Christian Löhle
@ 2022-11-18 10:47 ` Adrian Hunter
  2022-11-18 17:27   ` Bart Van Assche
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Hunter @ 2022-11-18 10:47 UTC (permalink / raw)
  To: Christian Löhle, axboe, ulf.hansson, linux-mmc,
	linux-kernel, linux-block, Christoph Hellwig
  Cc: Avri Altman, vincent.whitchurch

On 26/10/22 10:30, Christian Löhle wrote:
> Mmcblk relies on block layer requeueing to fulfill some requests under
> certain conditions. Improve the handling to get nicely ordered requests.
> 
> Using the terms a bit loosely to get a point across:
> Current behavior for 512 blksz and max_blk_count = 1 the scenario would
> be as follows:
> 
> - request for page 0 lba 0 to 7
> - request for page 1 lba 8 to 15
> - request for page 2 lba 16 to 23
> - request for page 3 lba 24 to 31
> 
> mmcblk modifies data->blocks = 1 for each and requeues,
> this leads to:
> 
> Access lba 0
> Access lba 8
> Access lba 16
> Access lba 24
> Access lba 1 (1. Requeue for page 0)
> Access lba 9 (1. Requeue for page 1)
> Access lba 17 (1. Requeue for page 2)
> Access lba 25 (1. Requeue for page 3)
> Access lba 2 (2. Requeue for page 0)
> ...
> 
> Of course we would rather have lbas consecutive.

Does anyone know why the block layer does not support
(max_hw_sectors << 9) < PAGE_SIZE ?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-18 10:47 ` Adrian Hunter
@ 2022-11-18 17:27   ` Bart Van Assche
  2022-11-21  8:25     ` Adrian Hunter
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Van Assche @ 2022-11-18 17:27 UTC (permalink / raw)
  To: Adrian Hunter, Christian Löhle, axboe, ulf.hansson,
	linux-mmc, linux-kernel, linux-block, Christoph Hellwig
  Cc: Avri Altman, vincent.whitchurch

On 11/18/22 02:47, Adrian Hunter wrote:
> On 26/10/22 10:30, Christian Löhle wrote:
>> Mmcblk relies on block layer requeueing to fulfill some requests under
>> certain conditions. Improve the handling to get nicely ordered requests.
>>
>> Using the terms a bit loosely to get a point across:
>> Current behavior for 512 blksz and max_blk_count = 1 the scenario would
>> be as follows:
>>
>> - request for page 0 lba 0 to 7
>> - request for page 1 lba 8 to 15
>> - request for page 2 lba 16 to 23
>> - request for page 3 lba 24 to 31
>>
>> mmcblk modifies data->blocks = 1 for each and requeues,
>> this leads to:
>>
>> Access lba 0
>> Access lba 8
>> Access lba 16
>> Access lba 24
>> Access lba 1 (1. Requeue for page 0)
>> Access lba 9 (1. Requeue for page 1)
>> Access lba 17 (1. Requeue for page 2)
>> Access lba 25 (1. Requeue for page 3)
>> Access lba 2 (2. Requeue for page 0)
>> ...
>>
>> Of course we would rather have lbas consecutive.
> 
> Does anyone know why the block layer does not support
> (max_hw_sectors << 9) < PAGE_SIZE ?

Hi Adrian,

Does this mean that the following patch series would not only be
useful for UFS but also for MMC? "[PATCH 00/10] Support DMA segments
smaller than the page size"
(https://lore.kernel.org/linux-block/20221019222324.362705-1-bvanassche@acm.org/).

Thanks,

Bart.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-18 17:27   ` Bart Van Assche
@ 2022-11-21  8:25     ` Adrian Hunter
  2022-11-21 19:14       ` Bart Van Assche
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Hunter @ 2022-11-21  8:25 UTC (permalink / raw)
  To: Bart Van Assche, Christian Löhle, axboe, ulf.hansson,
	linux-mmc, linux-kernel, linux-block, Christoph Hellwig
  Cc: Avri Altman, vincent.whitchurch

On 18/11/22 19:27, Bart Van Assche wrote:
> On 11/18/22 02:47, Adrian Hunter wrote:
>> On 26/10/22 10:30, Christian Löhle wrote:
>>> Mmcblk relies on block layer requeueing to fulfill some requests under
>>> certain conditions. Improve the handling to get nicely ordered requests.
>>>
>>> Using the terms a bit loosely to get a point across:
>>> Current behavior for 512 blksz and max_blk_count = 1 the scenario would
>>> be as follows:
>>>
>>> - request for page 0 lba 0 to 7
>>> - request for page 1 lba 8 to 15
>>> - request for page 2 lba 16 to 23
>>> - request for page 3 lba 24 to 31
>>>
>>> mmcblk modifies data->blocks = 1 for each and requeues,
>>> this leads to:
>>>
>>> Access lba 0
>>> Access lba 8
>>> Access lba 16
>>> Access lba 24
>>> Access lba 1 (1. Requeue for page 0)
>>> Access lba 9 (1. Requeue for page 1)
>>> Access lba 17 (1. Requeue for page 2)
>>> Access lba 25 (1. Requeue for page 3)
>>> Access lba 2 (2. Requeue for page 0)
>>> ...
>>>
>>> Of course we would rather have lbas consecutive.
>>
>> Does anyone know why the block layer does not support
>> (max_hw_sectors << 9) < PAGE_SIZE ?
> 
> Hi Adrian,
> 
> Does this mean that the following patch series would not only be
> useful for UFS but also for MMC? "[PATCH 00/10] Support DMA segments
> smaller than the page size"
> (https://lore.kernel.org/linux-block/20221019222324.362705-1-bvanassche@acm.org/).

That patchset still does not allow max_hw_sectors = 1 which is
what Christian's case needs.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-21  8:25     ` Adrian Hunter
@ 2022-11-21 19:14       ` Bart Van Assche
  2022-11-21 19:42         ` Adrian Hunter
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Van Assche @ 2022-11-21 19:14 UTC (permalink / raw)
  To: Adrian Hunter, Christian Löhle, axboe, ulf.hansson,
	linux-mmc, linux-kernel, linux-block, Christoph Hellwig
  Cc: Avri Altman, vincent.whitchurch

On 11/21/22 00:25, Adrian Hunter wrote:
> On 18/11/22 19:27, Bart Van Assche wrote:
>> On 11/18/22 02:47, Adrian Hunter wrote:
>>> Does anyone know why the block layer does not support
>>> (max_hw_sectors << 9) < PAGE_SIZE ?
>>
>> Does this mean that the following patch series would not only be
>> useful for UFS but also for MMC? "[PATCH 00/10] Support DMA segments
>> smaller than the page size"
>> (https://lore.kernel.org/linux-block/20221019222324.362705-1-bvanassche@acm.org/).
> 
> That patchset still does not allow max_hw_sectors = 1 which is
> what Christian's case needs.

Hi Adrian,

Why would that patch series not support max_hw_sectors = 1? What am I 
overlooking?

Thanks,

Bart.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-21 19:14       ` Bart Van Assche
@ 2022-11-21 19:42         ` Adrian Hunter
  2022-11-21 20:00           ` Bart Van Assche
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Hunter @ 2022-11-21 19:42 UTC (permalink / raw)
  To: Bart Van Assche, Christian Löhle, axboe, ulf.hansson,
	linux-mmc, linux-kernel, linux-block, Christoph Hellwig
  Cc: Avri Altman, vincent.whitchurch

On 21/11/22 21:14, Bart Van Assche wrote:
> On 11/21/22 00:25, Adrian Hunter wrote:
>> On 18/11/22 19:27, Bart Van Assche wrote:
>>> On 11/18/22 02:47, Adrian Hunter wrote:
>>>> Does anyone know why the block layer does not support
>>>> (max_hw_sectors << 9) < PAGE_SIZE ?
>>>
>>> Does this mean that the following patch series would not only be
>>> useful for UFS but also for MMC? "[PATCH 00/10] Support DMA segments
>>> smaller than the page size"
>>> (https://lore.kernel.org/linux-block/20221019222324.362705-1-bvanassche@acm.org/).
>>
>> That patchset still does not allow max_hw_sectors = 1 which is
>> what Christian's case needs.
> 
> Hi Adrian,
> 
> Why would that patch series not support max_hw_sectors = 1? What am I overlooking?

blk_queue_max_hw_sectors() does not allow it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-21 19:42         ` Adrian Hunter
@ 2022-11-21 20:00           ` Bart Van Assche
  2022-11-22  7:21             ` Avri Altman
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Van Assche @ 2022-11-21 20:00 UTC (permalink / raw)
  To: Adrian Hunter, Christian Löhle, axboe, ulf.hansson,
	linux-mmc, linux-kernel, linux-block, Christoph Hellwig
  Cc: Avri Altman, vincent.whitchurch

On 11/21/22 11:42, Adrian Hunter wrote:
> blk_queue_max_hw_sectors() does not allow it.

Right, I modified blk_queue_max_segment_size() in my patch series but 
not blk_queue_max_hw_sectors(). Adding a change for 
blk_queue_max_hw_sectors() to that patch series should be easy since 
that patch series already adds support for max_sectors being smaller 
than the page size.

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-21 20:00           ` Bart Van Assche
@ 2022-11-22  7:21             ` Avri Altman
  2022-11-22 19:29               ` Bart Van Assche
  0 siblings, 1 reply; 9+ messages in thread
From: Avri Altman @ 2022-11-22  7:21 UTC (permalink / raw)
  To: Bart Van Assche, Adrian Hunter, Christian Löhle, axboe,
	ulf.hansson, linux-mmc, linux-kernel, linux-block,
	Christoph Hellwig
  Cc: vincent.whitchurch

> 
> On 11/21/22 11:42, Adrian Hunter wrote:
> > blk_queue_max_hw_sectors() does not allow it.
> 
> Right, I modified blk_queue_max_segment_size() in my patch series but not
> blk_queue_max_hw_sectors(). Adding a change for
> blk_queue_max_hw_sectors() to that patch series should be easy since that
> patch series already adds support for max_sectors being smaller than the
> page size.
Once you do, please publish it to the scsi mailing list as well.

Thanks,
Avri

> 
> Thanks,
> 
> Bart.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] mmc: Improve block layer requeueing behavior
  2022-11-22  7:21             ` Avri Altman
@ 2022-11-22 19:29               ` Bart Van Assche
  0 siblings, 0 replies; 9+ messages in thread
From: Bart Van Assche @ 2022-11-22 19:29 UTC (permalink / raw)
  To: Avri Altman, Adrian Hunter, Christian Löhle, axboe,
	ulf.hansson, linux-mmc, linux-kernel, linux-block,
	Christoph Hellwig
  Cc: vincent.whitchurch

On 11/21/22 23:21, Avri Altman wrote:
> Once you do, please publish it to the scsi mailing list as well.

I will Cc the linux-scsi mailing list.

Thanks,

Bart.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-11-22 19:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  7:30 [PATCH 0/3] mmc: Improve block layer requeueing behavior Christian Löhle
2022-11-18 10:47 ` Adrian Hunter
2022-11-18 17:27   ` Bart Van Assche
2022-11-21  8:25     ` Adrian Hunter
2022-11-21 19:14       ` Bart Van Assche
2022-11-21 19:42         ` Adrian Hunter
2022-11-21 20:00           ` Bart Van Assche
2022-11-22  7:21             ` Avri Altman
2022-11-22 19:29               ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.