From: David Jander <david@protonic.nl>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [RFC] [PATCH v2 00/11] Optimize spi_sync path
Date: Thu, 16 Jun 2022 17:30:03 +0200 [thread overview]
Message-ID: <20220616173003.7202d19a@erd992> (raw)
In-Reply-To: <YqtEYTgL+wJXp9QU@sirena.org.uk>
On Thu, 16 Jun 2022 15:55:29 +0100
Mark Brown <broonie@kernel.org> wrote:
> On Thu, Jun 16, 2022 at 04:13:23PM +0200, David Jander wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> > > On Wed, Jun 15, 2022 at 02:46:23PM +0200, David Jander wrote:
>
> > > I've given this a first pass and it looks sensible so far - I'll need to
> > > give it a more thorough look but I'd expect it should be fine. The
> > > numbers certainly look good.
>
> > The current patch set probably needs to get partly squashed, since there are a
> > few patches that undo changes from a previous patch. I left them like this in
> > order to hopefully make the step by step mutation more clear for review.
>
> Yes, there's a bit of stuff. I think it's based off your previous
> proposed patch too?
Yes, in big part. I removed the API change, and all further optimizations and
improvements are done step by step on top, like your suggestion to introduce
the completion in __pump_messages and after that optimizing it further. Ideally
I should maybe have tried to split up patch 2 a bit more.
> > I had some doubts about patch 11, since it introduces 2 new members to struct
> > spi_controller. I was trying to keep the pollution down, but I couldn't find a
> > better way to do this optimization. Any suggestions? Maybe a better name/place
> > for these flags?
>
> Not really - I'm not too concerned about individual flags since we don't
> have so many SPI controllers in a system, it's not like it's a per task
> overhead or similar.
Ok, then we leave it as is. I was looking for a place that grouped "private"
or "internal" struct members, but couldn't fine one really. SPI drivers
looking at these wouldn't make sense I guess.
> > Ideally this would get as much different hardware testing as possible before
> > going further upstream. Do you have access to some platforms suitable for
> > stressing SPI with multiple clients simultaneously? Known "problematic"
> > controllers maybe?
>
> Well, the fastest way to get it into a wide range of CI is for me to
> apply it so people who test -next will start covering it... I was going
> to kick it into my test branch KernelCI once I've got it reviewed
> properly which will get at least some boot testing on a bunch of
> platforms.
Ah, great. I will see if I can get it tested on some more other platforms from
our side.
> For testing the main thing that'd be nice for testing would probably be
> coverage of controllers that don't block in transfer_one_message() and
> those that complete in interrupt context while blocking in there.
Ah, yes, that would be ideal. spi-pl022.c and spi-axi-spi-engine.c do this
AFAIK.
Also, if someone could make some independent performance comparisons of
before/after this series and the per-cpu stats patch, that would be very
interesting. I don't like people having to trust me on my word about the
gains ;-)
Best regards,
--
David Jander
next prev parent reply other threads:[~2022-06-16 15:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 12:46 [RFC] [PATCH v2 00/11] Optimize spi_sync path David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 01/11] spi: Move ctlr->cur_msg_prepared to struct spi_message David Jander
2022-06-15 12:46 ` [FRC] [PATCH v2 02/11] spi: Don't use the message queue if possible in spi_sync David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 03/11] spi: Lock controller idling transition inside the io_mutex David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 04/11] spi: __spi_pump_messages: Consolidate spin_unlocks to goto target David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 05/11] spi: Remove check for controller idling in spi sync path David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 06/11] spi: Remove check for idling in __spi_pump_messages() David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 07/11] spi: Remove the now unused ctlr->idling flag David Jander
2022-06-15 12:46 ` [RFC] [PATCH 08/11] spi: Remove unneeded READ_ONCE for ctlr->busy flag David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 09/11] spi: Set ctlr->cur_msg also in the sync transfer case David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 10/11] spi: Ensure the io_mutex is held until spi_finalize_current_message() David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 11/11] spi: opportunistically skip ctlr->cur_msg_completion David Jander
2022-06-15 13:31 ` [RFC] [PATCH v2 00/11] Optimize spi_sync path Marc Kleine-Budde
2022-06-15 14:13 ` David Jander
2022-06-20 18:15 ` Mark Brown
2022-06-21 6:15 ` David Jander
2022-06-16 13:22 ` Mark Brown
2022-06-16 14:13 ` David Jander
2022-06-16 14:55 ` Mark Brown
2022-06-16 15:30 ` David Jander [this message]
2022-06-17 12:08 ` David Jander
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=20220616173003.7202d19a@erd992 \
--to=david@protonic.nl \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).