All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
@ 2018-12-09  8:55 Jan Kiszka
  2018-12-10  4:13 ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2018-12-09  8:55 UTC (permalink / raw)
  To: u-boot

The default settings of the block cache so far only allow to hold single
1K blocks. However, larger filesystems tend to use 4K. Failing to cache
those massively degrades access performance unless you manually tune the
cache first. This is not desirable.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

My "load mmc is slow" problem reappeared on AM65xx after growing the
rootfs to almost 1 GB - despite an active block cache.

 drivers/block/blkcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index 294511fcdb..1fa64989d3 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -24,7 +24,7 @@ struct block_cache_node {
 static LIST_HEAD(block_cache);
 
 static struct block_cache_stats _stats = {
-	.max_blocks_per_entry = 2,
+	.max_blocks_per_entry = 8,
 	.max_entries = 32
 };
 
-- 
2.16.4

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

* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
  2018-12-09  8:55 [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default Jan Kiszka
@ 2018-12-10  4:13 ` Marek Vasut
  2018-12-10  6:18   ` Jan Kiszka
  2018-12-10 12:28   ` Tom Rini
  0 siblings, 2 replies; 7+ messages in thread
From: Marek Vasut @ 2018-12-10  4:13 UTC (permalink / raw)
  To: u-boot

On 12/09/2018 09:55 AM, Jan Kiszka wrote:
> The default settings of the block cache so far only allow to hold single
> 1K blocks. However, larger filesystems tend to use 4K. Failing to cache
> those massively degrades access performance unless you manually tune the
> cache first. This is not desirable.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

I submitted the same patch before [1], oddly enough it was not picked by
Tom.

[1]
http://u-boot.10912.n7.nabble.com/PATCH-RFC-blk-Increase-cache-element-size-td337975.html

> ---
> 
> My "load mmc is slow" problem reappeared on AM65xx after growing the
> rootfs to almost 1 GB - despite an active block cache.
> 
>  drivers/block/blkcache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
> index 294511fcdb..1fa64989d3 100644
> --- a/drivers/block/blkcache.c
> +++ b/drivers/block/blkcache.c
> @@ -24,7 +24,7 @@ struct block_cache_node {
>  static LIST_HEAD(block_cache);
>  
>  static struct block_cache_stats _stats = {
> -	.max_blocks_per_entry = 2,
> +	.max_blocks_per_entry = 8,
>  	.max_entries = 32
>  };
>  
> 


-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
  2018-12-10  4:13 ` Marek Vasut
@ 2018-12-10  6:18   ` Jan Kiszka
  2018-12-10 12:28   ` Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2018-12-10  6:18 UTC (permalink / raw)
  To: u-boot

On 10.12.18 05:13, Marek Vasut wrote:
> On 12/09/2018 09:55 AM, Jan Kiszka wrote:
>> The default settings of the block cache so far only allow to hold single
>> 1K blocks. However, larger filesystems tend to use 4K. Failing to cache
>> those massively degrades access performance unless you manually tune the
>> cache first. This is not desirable.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> I submitted the same patch before [1], oddly enough it was not picked by
> Tom.

Maybe because the follow-up discussion felt like the topic didn't settle? I 
would vote for resolving this 4K think first, because it's very real. OTW: You 
patch should go in first of all, then better solutions can be developed on top.

Jan

> 
> [1]
> http://u-boot.10912.n7.nabble.com/PATCH-RFC-blk-Increase-cache-element-size-td337975.html
> 
>> ---
>>
>> My "load mmc is slow" problem reappeared on AM65xx after growing the
>> rootfs to almost 1 GB - despite an active block cache.
>>
>>   drivers/block/blkcache.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
>> index 294511fcdb..1fa64989d3 100644
>> --- a/drivers/block/blkcache.c
>> +++ b/drivers/block/blkcache.c
>> @@ -24,7 +24,7 @@ struct block_cache_node {
>>   static LIST_HEAD(block_cache);
>>   
>>   static struct block_cache_stats _stats = {
>> -	.max_blocks_per_entry = 2,
>> +	.max_blocks_per_entry = 8,
>>   	.max_entries = 32
>>   };
>>   
>>
> 
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
  2018-12-10  4:13 ` Marek Vasut
  2018-12-10  6:18   ` Jan Kiszka
@ 2018-12-10 12:28   ` Tom Rini
  2018-12-20  8:45     ` Marek Vasut
  1 sibling, 1 reply; 7+ messages in thread
From: Tom Rini @ 2018-12-10 12:28 UTC (permalink / raw)
  To: u-boot

On Mon, Dec 10, 2018 at 05:13:58AM +0100, Marek Vasut wrote:
> On 12/09/2018 09:55 AM, Jan Kiszka wrote:
> > The default settings of the block cache so far only allow to hold single
> > 1K blocks. However, larger filesystems tend to use 4K. Failing to cache
> > those massively degrades access performance unless you manually tune the
> > cache first. This is not desirable.
> > 
> > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> I submitted the same patch before [1], oddly enough it was not picked by
> Tom.
> 
> [1]
> http://u-boot.10912.n7.nabble.com/PATCH-RFC-blk-Increase-cache-element-size-td337975.html

Based on a quick re-read, I had filed that patch as "Marek says he'll
look into a more complex but general scheme".  If that's not the case
then yes, we can just do that.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181210/e6a3af73/attachment.sig>

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

* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
  2018-12-10 12:28   ` Tom Rini
@ 2018-12-20  8:45     ` Marek Vasut
  2019-01-03 15:42       ` Jan Kiszka
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2018-12-20  8:45 UTC (permalink / raw)
  To: u-boot

On 12/10/2018 01:28 PM, Tom Rini wrote:
> On Mon, Dec 10, 2018 at 05:13:58AM +0100, Marek Vasut wrote:
>> On 12/09/2018 09:55 AM, Jan Kiszka wrote:
>>> The default settings of the block cache so far only allow to hold single
>>> 1K blocks. However, larger filesystems tend to use 4K. Failing to cache
>>> those massively degrades access performance unless you manually tune the
>>> cache first. This is not desirable.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> I submitted the same patch before [1], oddly enough it was not picked by
>> Tom.
>>
>> [1]
>> http://u-boot.10912.n7.nabble.com/PATCH-RFC-blk-Increase-cache-element-size-td337975.html
> 
> Based on a quick re-read, I had filed that patch as "Marek says he'll
> look into a more complex but general scheme".  If that's not the case
> then yes, we can just do that.  Thanks!

I still don't see the original patch in u-boot/master

-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
  2018-12-20  8:45     ` Marek Vasut
@ 2019-01-03 15:42       ` Jan Kiszka
  2019-01-03 15:52         ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2019-01-03 15:42 UTC (permalink / raw)
  To: u-boot

On 20.12.18 09:45, Marek Vasut wrote:
> On 12/10/2018 01:28 PM, Tom Rini wrote:
>> On Mon, Dec 10, 2018 at 05:13:58AM +0100, Marek Vasut wrote:
>>> On 12/09/2018 09:55 AM, Jan Kiszka wrote:
>>>> The default settings of the block cache so far only allow to hold single
>>>> 1K blocks. However, larger filesystems tend to use 4K. Failing to cache
>>>> those massively degrades access performance unless you manually tune the
>>>> cache first. This is not desirable.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> I submitted the same patch before [1], oddly enough it was not picked by
>>> Tom.
>>>
>>> [1]
>>> http://u-boot.10912.n7.nabble.com/PATCH-RFC-blk-Increase-cache-element-size-td337975.html
>>
>> Based on a quick re-read, I had filed that patch as "Marek says he'll
>> look into a more complex but general scheme".  If that's not the case
>> then yes, we can just do that.  Thanks!
> 
> I still don't see the original patch in u-boot/master
> 

Ping. Some form of this change should go into the next release, IMHO.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default
  2019-01-03 15:42       ` Jan Kiszka
@ 2019-01-03 15:52         ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2019-01-03 15:52 UTC (permalink / raw)
  To: u-boot

On Thu, Jan 03, 2019 at 04:42:08PM +0100, Jan Kiszka wrote:
> On 20.12.18 09:45, Marek Vasut wrote:
> >On 12/10/2018 01:28 PM, Tom Rini wrote:
> >>On Mon, Dec 10, 2018 at 05:13:58AM +0100, Marek Vasut wrote:
> >>>On 12/09/2018 09:55 AM, Jan Kiszka wrote:
> >>>>The default settings of the block cache so far only allow to hold single
> >>>>1K blocks. However, larger filesystems tend to use 4K. Failing to cache
> >>>>those massively degrades access performance unless you manually tune the
> >>>>cache first. This is not desirable.
> >>>>
> >>>>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>>
> >>>I submitted the same patch before [1], oddly enough it was not picked by
> >>>Tom.
> >>>
> >>>[1]
> >>>http://u-boot.10912.n7.nabble.com/PATCH-RFC-blk-Increase-cache-element-size-td337975.html
> >>
> >>Based on a quick re-read, I had filed that patch as "Marek says he'll
> >>look into a more complex but general scheme".  If that's not the case
> >>then yes, we can just do that.  Thanks!
> >
> >I still don't see the original patch in u-boot/master
> >
> 
> Ping. Some form of this change should go into the next release, IMHO.

So, this initially tripped over some EFI related issue, which has been
fixed.  But at this point I'm going to pull it in from v2019.04 instead.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190103/69436cf4/attachment.sig>

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

end of thread, other threads:[~2019-01-03 15:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-09  8:55 [U-Boot] [PATCH] drivers: block: Allow to cache 4K blocks by default Jan Kiszka
2018-12-10  4:13 ` Marek Vasut
2018-12-10  6:18   ` Jan Kiszka
2018-12-10 12:28   ` Tom Rini
2018-12-20  8:45     ` Marek Vasut
2019-01-03 15:42       ` Jan Kiszka
2019-01-03 15:52         ` Tom Rini

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.