From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Peter Korsgaard <peter@korsgaard.com>,
Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@ew.tq-group.com
Subject: Re: [PATCH v2 1/2] i2c: ocores: increase poll timeout to total transfer timeout
Date: Wed, 14 Jan 2026 10:34:59 +0100 [thread overview]
Message-ID: <aWdjQ1mubxk3m0JY@ninjato> (raw)
In-Reply-To: <5c535725c5e4761e6f16ff4016affe8ddcc79d88.camel@ew.tq-group.com>
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
Hi Matthias,
> This code does not have interrupts disabled, we could not fall back from
> read_poll_timeout_atomic() to read_poll_timeout() otherwise.
Yes, that's what I thought as well.
> that a sleeping wait would make it more likely for a switch to a different task
> to happen after every byte, negatively impacting I2C performance; this is not
> something I have verified however.
Quite some prominent controller drivers use readX_poll_timeout(), so it
really seems there is no huge penalty in practice. Especially not with
cores so fast these days that tasks can be served even in 100us.
> It is spinning for 1ms because that's what the old code did (which only spun
> without fallback to sleeping).
I understand. Yet, I think the spinning is legacy behaviour and I would
prefer plain readX_poll_timeout(). Unless there is something I
overlooked. Makes the code simpler and easier to maintain.
Thanks and happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-01-14 9:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 9:19 [PATCH v2 1/2] i2c: ocores: increase poll timeout to total transfer timeout Matthias Schiffer
2025-10-09 9:19 ` [PATCH v2 2/2] i2c: ocores: respect adapter timeout in IRQ mode Matthias Schiffer
2025-10-09 13:21 ` Andrew Lunn
2025-10-09 13:20 ` [PATCH v2 1/2] i2c: ocores: increase poll timeout to total transfer timeout Andrew Lunn
2025-10-09 13:26 ` Matthias Schiffer
2025-12-10 8:51 ` Matthias Schiffer
2026-01-13 13:02 ` Wolfram Sang
2026-01-13 14:21 ` Andrew Lunn
2026-01-14 8:28 ` Matthias Schiffer
2026-01-14 9:34 ` Wolfram Sang [this message]
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=aWdjQ1mubxk3m0JY@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=andi.shyti@kernel.org \
--cc=andrew@lunn.ch \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=peter@korsgaard.com \
/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