2024-03-18 06:42:06

by wangkaiyuan

[permalink] [raw]
Subject: [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: wangkaiyuan <[email protected]>
---
drivers/tty/serial/max310x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 14dd9cfaa9f7..3b72b2137275 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1478,7 +1478,7 @@ static struct regmap_config regcfg = {
.reg_bits = 8,
.val_bits = 8,
.write_flag_mask = MAX310X_WRITE_BIT,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.max_register = MAX310X_REG_1F,
.writeable_reg = max310x_reg_writeable,
.volatile_reg = max310x_reg_volatile,
@@ -1582,7 +1582,7 @@ static int max310x_i2c_extended_reg_enable(struct device *dev, bool enable)
static struct regmap_config regcfg_i2c = {
.reg_bits = 8,
.val_bits = 8,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.writeable_reg = max310x_reg_writeable,
.volatile_reg = max310x_reg_volatile,
.precious_reg = max310x_reg_precious,
--
2.27.0



2024-03-18 08:31:06

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache

On Mon, Mar 18, 2024 at 8:40 AM wangkaiyuan <[email protected]> wrote:
>
> The maple tree register cache is based on a much more modern data structure
> than the rbtree cache and makes optimisation choices which are probably
> more appropriate for modern systems than those made by the rbtree cache.

FWIW,
Reviewed-by: Andy Shevchenko <[email protected]>

--
With Best Regards,
Andy Shevchenko

2024-04-09 13:43:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache

On Mon, Mar 18, 2024 at 02:40:36PM +0800, wangkaiyuan wrote:
> The maple tree register cache is based on a much more modern data structure
> than the rbtree cache and makes optimisation choices which are probably
> more appropriate for modern systems than those made by the rbtree cache.
>
> Signed-off-by: wangkaiyuan <[email protected]>
> ---
> drivers/tty/serial/max310x.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Where is patch 2/2 of this series? I don't see it anywhere on
lore.kernel.org.

Please fix up and resend the patch properly.

thanks,

greg k-h

2024-04-09 13:46:38

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/2] tty: serial: max310x: convert to use maple tree register cache

On Tue, Apr 09, 2024 at 03:39:32PM +0200, Greg KH wrote:
> On Mon, Mar 18, 2024 at 02:40:36PM +0800, wangkaiyuan wrote:
> > The maple tree register cache is based on a much more modern data structure
> > than the rbtree cache and makes optimisation choices which are probably
> > more appropriate for modern systems than those made by the rbtree cache.
> >
> > Signed-off-by: wangkaiyuan <[email protected]>
> > ---
> > drivers/tty/serial/max310x.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Where is patch 2/2 of this series? I don't see it anywhere on
> lore.kernel.org.

Ah, I see it now, it is not connected here. I'll take both now but next
time please use something like 'git send-email' for both commits at the
same time.

thanks,

greg k-h