mbox series

[00/18] mfd: convert to use maple tree register cache

Message ID 20240206071314.8721-1-liubo03@inspur.com (mailing list archive)
Headers show
Series mfd: convert to use maple tree register cache | expand

Message

Bo Liu Feb. 6, 2024, 7:12 a.m. UTC
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.

Bo Liu (18):
  mfd: ac100: convert to use maple tree register cache
  mfd: as3711: convert to use maple tree register cache
  mfd: as3722: convert to use maple tree register cache
  mfd: axp20x: convert to use maple tree register cache
  mfd: bcm590xx: convert to use maple tree register cache
  mfd: bd9571mwv: convert to use maple tree register cache
  mfd: dialog: convert to use maple tree register cache
  mfd: khadas-mcu: convert to use maple tree register cache
  mfd: lochnagar-i2c: convert to use maple tree register cache
  mfd: wolfson: convert to use maple tree register cache
  mfd: rohm: convert to use maple tree register cache
  mfd: rk8xx: convert to use maple tree register cache
  mfd: rn5t618: convert to use maple tree register cache
  mfd: rsmu_i2c: convert to use maple tree register cache
  mfd: si476x: convert to use maple tree register cache
  mfd: stmfx: convert to use maple tree register cache
  mfd: stpmic1: convert to use maple tree register cache
  mfd: rc5t583: convert to use maple tree register cache

 drivers/mfd/ac100.c         | 2 +-
 drivers/mfd/as3711.c        | 2 +-
 drivers/mfd/as3722.c        | 2 +-
 drivers/mfd/axp20x.c        | 4 ++--
 drivers/mfd/bcm590xx.c      | 4 ++--
 drivers/mfd/bd9571mwv.c     | 4 ++--
 drivers/mfd/da9052-core.c   | 2 +-
 drivers/mfd/da9055-core.c   | 2 +-
 drivers/mfd/da9062-core.c   | 4 ++--
 drivers/mfd/da9063-i2c.c    | 2 +-
 drivers/mfd/da9150-core.c   | 2 +-
 drivers/mfd/khadas-mcu.c    | 2 +-
 drivers/mfd/lochnagar-i2c.c | 4 ++--
 drivers/mfd/rc5t583.c       | 2 +-
 drivers/mfd/rk8xx-spi.c     | 2 +-
 drivers/mfd/rn5t618.c       | 2 +-
 drivers/mfd/rohm-bd71828.c  | 4 ++--
 drivers/mfd/rohm-bd718x7.c  | 2 +-
 drivers/mfd/rohm-bd9576.c   | 2 +-
 drivers/mfd/rsmu_i2c.c      | 2 +-
 drivers/mfd/si476x-prop.c   | 2 +-
 drivers/mfd/stmfx.c         | 2 +-
 drivers/mfd/stpmic1.c       | 2 +-
 drivers/mfd/wm5102-tables.c | 2 +-
 drivers/mfd/wm5110-tables.c | 2 +-
 drivers/mfd/wm8350-regmap.c | 2 +-
 drivers/mfd/wm8400-core.c   | 2 +-
 drivers/mfd/wm97xx-core.c   | 6 +++---
 28 files changed, 36 insertions(+), 36 deletions(-)

Comments

Geert Uytterhoeven Feb. 6, 2024, 9:33 a.m. UTC | #1
Hi Bo,

CC broonie

Thanks for your series!

On Tue, Feb 6, 2024 at 8:16 AM Bo Liu <liubo03@inspur.com> 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

probably?

> more appropriate for modern systems than those made by the rbtree cache.
>
> Bo Liu (18):
>   mfd: ac100: convert to use maple tree register cache
>   mfd: as3711: convert to use maple tree register cache
>   mfd: as3722: convert to use maple tree register cache
>   mfd: axp20x: convert to use maple tree register cache
>   mfd: bcm590xx: convert to use maple tree register cache
>   mfd: bd9571mwv: convert to use maple tree register cache
>   mfd: dialog: convert to use maple tree register cache
>   mfd: khadas-mcu: convert to use maple tree register cache
>   mfd: lochnagar-i2c: convert to use maple tree register cache
>   mfd: wolfson: convert to use maple tree register cache
>   mfd: rohm: convert to use maple tree register cache
>   mfd: rk8xx: convert to use maple tree register cache
>   mfd: rn5t618: convert to use maple tree register cache
>   mfd: rsmu_i2c: convert to use maple tree register cache
>   mfd: si476x: convert to use maple tree register cache
>   mfd: stmfx: convert to use maple tree register cache
>   mfd: stpmic1: convert to use maple tree register cache
>   mfd: rc5t583: convert to use maple tree register cache

If all of this is true, is there any reason to keep REGCACHE_RBTREE
around?  If not, perhaps REGCACHE_RBTREE should be treated as
REGCACHE_MAPLE in the regmap core code first, followed by a single
tree-wide patch to replace REGCACHE_RBTREE?

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Mark Brown Feb. 6, 2024, 10:07 a.m. UTC | #2
On Tue, Feb 06, 2024 at 10:33:22AM +0100, Geert Uytterhoeven wrote:

> If all of this is true, is there any reason to keep REGCACHE_RBTREE
> around?  If not, perhaps REGCACHE_RBTREE should be treated as
> REGCACHE_MAPLE in the regmap core code first, followed by a single
> tree-wide patch to replace REGCACHE_RBTREE?

There is a very small niche for devices where cache syncs are a
particularly important part of the workload where rbtree's choices might
give better performance, especially on systems with low end CPUs.
Geert Uytterhoeven Feb. 6, 2024, 10:14 a.m. UTC | #3
Hi Mark,

On Tue, Feb 6, 2024 at 11:09 AM Mark Brown <broonie@kernel.org> wrote:
> On Tue, Feb 06, 2024 at 10:33:22AM +0100, Geert Uytterhoeven wrote:
> > If all of this is true, is there any reason to keep REGCACHE_RBTREE
> > around?  If not, perhaps REGCACHE_RBTREE should be treated as
> > REGCACHE_MAPLE in the regmap core code first, followed by a single
> > tree-wide patch to replace REGCACHE_RBTREE?
>
> There is a very small niche for devices where cache syncs are a
> particularly important part of the workload where rbtree's choices might
> give better performance, especially on systems with low end CPUs.

The REGCACHE_* value is specified by the device, not by the CPU?
While some of these MFD devices are on-SoC, and thus there is some
relation between device and CPU, several others (e.g. PMICs) are
external, and thus might be present on systems with a variety of CPU
performance.

Perhaps the value should depend on some CPU heuristic instead?

Gr{oetje,eeting}s,

                        Geert
Mark Brown Feb. 6, 2024, 10:59 a.m. UTC | #4
On Tue, Feb 06, 2024 at 11:14:11AM +0100, Geert Uytterhoeven wrote:
> On Tue, Feb 6, 2024 at 11:09 AM Mark Brown <broonie@kernel.org> wrote:

> > There is a very small niche for devices where cache syncs are a
> > particularly important part of the workload where rbtree's choices might
> > give better performance, especially on systems with low end CPUs.

> The REGCACHE_* value is specified by the device, not by the CPU?

The device is going to dominate here, the main thing is how much of the
workload consists of syncs.

> While some of these MFD devices are on-SoC, and thus there is some
> relation between device and CPU, several others (e.g. PMICs) are
> external, and thus might be present on systems with a variety of CPU
> performance.

> Perhaps the value should depend on some CPU heuristic instead?

No.
Lee Jones Feb. 8, 2024, 2:24 p.m. UTC | #5
On Tue, 06 Feb 2024 02:12:56 -0500, Bo Liu 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.
> 
> Bo Liu (18):
>   mfd: ac100: convert to use maple tree register cache
>   mfd: as3711: convert to use maple tree register cache
>   mfd: as3722: convert to use maple tree register cache
>   mfd: axp20x: convert to use maple tree register cache
>   mfd: bcm590xx: convert to use maple tree register cache
>   mfd: bd9571mwv: convert to use maple tree register cache
>   mfd: dialog: convert to use maple tree register cache
>   mfd: khadas-mcu: convert to use maple tree register cache
>   mfd: lochnagar-i2c: convert to use maple tree register cache
>   mfd: wolfson: convert to use maple tree register cache
>   mfd: rohm: convert to use maple tree register cache
>   mfd: rk8xx: convert to use maple tree register cache
>   mfd: rn5t618: convert to use maple tree register cache
>   mfd: rsmu_i2c: convert to use maple tree register cache
>   mfd: si476x: convert to use maple tree register cache
>   mfd: stmfx: convert to use maple tree register cache
>   mfd: stpmic1: convert to use maple tree register cache
>   mfd: rc5t583: convert to use maple tree register cache
> 
> [...]

Applied, thanks!

[01/18] mfd: ac100: convert to use maple tree register cache
        commit: 8745a81ac22f42c7233fbddc6aa5922b231aac2a
[02/18] mfd: as3711: convert to use maple tree register cache
        commit: 780b1aa441a3d64e400cb2ea96bc3e162322eb31
[03/18] mfd: as3722: convert to use maple tree register cache
        commit: aea5c3cbc51eee3ac25ff8f936252901c4549011
[04/18] mfd: axp20x: convert to use maple tree register cache
        commit: 009073d504f67146d936cc45f21cc27c1bc15490
[05/18] mfd: bcm590xx: convert to use maple tree register cache
        commit: 684c1f0b79417cf08810dfd57c5a549a9741ad7a
[06/18] mfd: bd9571mwv: convert to use maple tree register cache
        commit: 35b1b8622ca3172b3c6b2a377e5913bac0367634
[07/18] mfd: dialog: convert to use maple tree register cache
        commit: 1cb7a3bca56c124ca9e5c13fcac7de884c195c5c
[08/18] mfd: khadas-mcu: convert to use maple tree register cache
        commit: 5f734f5f374f68960afd2130a5ce982912c14c15
[09/18] mfd: lochnagar-i2c: convert to use maple tree register cache
        commit: 8881896e05b6a91251dde0ce21ce79c2c201888d
[10/18] mfd: wolfson: convert to use maple tree register cache
        commit: f353b2c639e4f4ac9831d94c8237026cebaa8e73
[11/18] mfd: rohm: convert to use maple tree register cache
        commit: aabd38f3779b8108b65cc7ae8b5c20a6c352b0a2
[12/18] mfd: rk8xx: convert to use maple tree register cache
        commit: 08aa1e797a5cc97d2106476263f938342e72015e
[13/18] mfd: rn5t618: convert to use maple tree register cache
        commit: a011cacb63c3ff6562bd86afae8cdd49d0f075c9
[14/18] mfd: rsmu_i2c: convert to use maple tree register cache
        commit: b85821cecdf933420a6ba93658e1e4710644f5c1
[15/18] mfd: si476x: convert to use maple tree register cache
        commit: 030473871c3f4f126bd43018517abfcb070f6b95
[16/18] mfd: stmfx: convert to use maple tree register cache
        commit: 87a48e35ce2ef992287b828b1268bedc7415d2de
[17/18] mfd: stpmic1: convert to use maple tree register cache
        commit: ab993d2d68951db3ebfeaa44567a790ec566526d
[18/18] mfd: rc5t583: convert to use maple tree register cache
        commit: d5132d176d6f21742ac67fd311ccc61fe830e999

--
Lee Jones [李琼斯]
Lee Jones Feb. 8, 2024, 2:26 p.m. UTC | #6
On Thu, 08 Feb 2024, Lee Jones wrote:

> On Tue, 06 Feb 2024 02:12:56 -0500, Bo Liu 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.
> > 
> > Bo Liu (18):
> >   mfd: ac100: convert to use maple tree register cache
> >   mfd: as3711: convert to use maple tree register cache
> >   mfd: as3722: convert to use maple tree register cache
> >   mfd: axp20x: convert to use maple tree register cache
> >   mfd: bcm590xx: convert to use maple tree register cache
> >   mfd: bd9571mwv: convert to use maple tree register cache
> >   mfd: dialog: convert to use maple tree register cache
> >   mfd: khadas-mcu: convert to use maple tree register cache
> >   mfd: lochnagar-i2c: convert to use maple tree register cache
> >   mfd: wolfson: convert to use maple tree register cache
> >   mfd: rohm: convert to use maple tree register cache
> >   mfd: rk8xx: convert to use maple tree register cache
> >   mfd: rn5t618: convert to use maple tree register cache
> >   mfd: rsmu_i2c: convert to use maple tree register cache
> >   mfd: si476x: convert to use maple tree register cache
> >   mfd: stmfx: convert to use maple tree register cache
> >   mfd: stpmic1: convert to use maple tree register cache
> >   mfd: rc5t583: convert to use maple tree register cache
> > 
> > [...]
> 
> Applied, thanks!
> 
> [01/18] mfd: ac100: convert to use maple tree register cache
>         commit: 8745a81ac22f42c7233fbddc6aa5922b231aac2a
> [02/18] mfd: as3711: convert to use maple tree register cache
>         commit: 780b1aa441a3d64e400cb2ea96bc3e162322eb31
> [03/18] mfd: as3722: convert to use maple tree register cache
>         commit: aea5c3cbc51eee3ac25ff8f936252901c4549011
> [04/18] mfd: axp20x: convert to use maple tree register cache
>         commit: 009073d504f67146d936cc45f21cc27c1bc15490
> [05/18] mfd: bcm590xx: convert to use maple tree register cache
>         commit: 684c1f0b79417cf08810dfd57c5a549a9741ad7a
> [06/18] mfd: bd9571mwv: convert to use maple tree register cache
>         commit: 35b1b8622ca3172b3c6b2a377e5913bac0367634
> [07/18] mfd: dialog: convert to use maple tree register cache
>         commit: 1cb7a3bca56c124ca9e5c13fcac7de884c195c5c
> [08/18] mfd: khadas-mcu: convert to use maple tree register cache
>         commit: 5f734f5f374f68960afd2130a5ce982912c14c15
> [09/18] mfd: lochnagar-i2c: convert to use maple tree register cache
>         commit: 8881896e05b6a91251dde0ce21ce79c2c201888d
> [10/18] mfd: wolfson: convert to use maple tree register cache
>         commit: f353b2c639e4f4ac9831d94c8237026cebaa8e73
> [11/18] mfd: rohm: convert to use maple tree register cache
>         commit: aabd38f3779b8108b65cc7ae8b5c20a6c352b0a2
> [12/18] mfd: rk8xx: convert to use maple tree register cache
>         commit: 08aa1e797a5cc97d2106476263f938342e72015e
> [13/18] mfd: rn5t618: convert to use maple tree register cache
>         commit: a011cacb63c3ff6562bd86afae8cdd49d0f075c9
> [14/18] mfd: rsmu_i2c: convert to use maple tree register cache
>         commit: b85821cecdf933420a6ba93658e1e4710644f5c1
> [15/18] mfd: si476x: convert to use maple tree register cache
>         commit: 030473871c3f4f126bd43018517abfcb070f6b95
> [16/18] mfd: stmfx: convert to use maple tree register cache
>         commit: 87a48e35ce2ef992287b828b1268bedc7415d2de
> [17/18] mfd: stpmic1: convert to use maple tree register cache
>         commit: ab993d2d68951db3ebfeaa44567a790ec566526d
> [18/18] mfd: rc5t583: convert to use maple tree register cache
>         commit: d5132d176d6f21742ac67fd311ccc61fe830e999

Next time you send a large patch-set, could you please ensure the
subject line format matches that of the subsystem you're submitting to
please?  It would have a saved me from a whole bunch of fix-ups.

Thanks.