mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regcache: Push async I/O request down into the rbtree cache
Date: Wed, 19 Jul 2023 08:40:09 +0000	[thread overview]
Message-ID: <20230719084009.GI103419@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <20230719-regcache-async-rbtree-v1-1-b03d30cf1daf@kernel.org>

On Wed, Jul 19, 2023 at 12:30:40AM +0100, Mark Brown wrote:
> Currently the regcache core unconditionally enables async I/O for all cache
> types, causing problems for the maple tree cache which dynamically allocates
> the buffers used to write registers to the device since async requires the
> buffers to be kept around until the I/O has been completed.
> 
> This use of async I/O is mainly for the rbtree cache which stores data in
> a format directly usable for regmap_raw_write(), though there is a special
> case for single register writes which would also have allowed it to be used
> with the flat cache. It is a bit of a landmine for other caches since it
> implicitly converts sync operations to async, and with modern hardware it
> is not clear that async I/O is actually a performance win as shown by the
> performance work David Jander did with SPI. In multi core systems the cost
> of managing concurrency ends up swamping the performance benefit and almost
> all modern systems are multi core.
> 
> Address this by pushing the enablement of async I/O down into the rbtree
> cache where it is actively used, avoiding surprises for other cache
> implementations.
> 
> Reported-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> Fixes: bfa0b38c1483 ("regmap: maple: Implement block sync for the maple tree cache")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

  reply	other threads:[~2023-07-19  8:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 23:30 Mark Brown
2023-07-19  8:40 ` Charles Keepax [this message]
2023-07-21 17:41 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230719084009.GI103419@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®