From: Mario Limonciello <mario.limonciello@amd.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Shyam-sundar.S-k@amd.com, linus.walleij@linaro.org,
Basavaraj.Natikar@amd.com, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
Kieran Levin <ktl@frame.work>
Subject: Re: [PATCH] pinctrl: amd: Set up affinity for GPIO lines when enabling interrupt
Date: Mon, 20 May 2024 21:01:01 -0500 [thread overview]
Message-ID: <4ee142f5-7e21-4fdb-aadb-7328407e7c42@amd.com> (raw)
In-Reply-To: <ZksaCG3Q5qHthNcN@smile.fi.intel.com>
On 5/20/2024 04:38, Andy Shevchenko wrote:
> On Sun, May 19, 2024 at 07:41:09AM -0500, Mario Limonciello wrote:
>> When a touchpad's attention interrupt is triggered on a different
>> CPU than the GPIO controller interrupt multiple CPUs wake up the system
>> and can cause higher power consumption than necessary for operating
>> the touchpad.
>>
>> Waking up the additional CPUs is especially unnecessary as the
>> irq_ack() callback for pinctrl-amd doesn't do anything.
>>
>> To solve this save the affinity of the GPIO controller interrupt when
>> it's set up and assign that affinity to the GPIO line IRQ.
>
> I do not much care about AMD :-) case but I think this is quite a big hammer
> with possible undesired effects. It will basically put _all_ GPIO IRQs on
> the same CPU which may slow down other peripherals, like UART, with potential
> of buffer overrun (on the high speed modes).
>
Yeah I see your point.
> Ideally it should be done in a way that exact consumer may ask for this from
> its driver. Yet, I have no idea how to achieve this, but it would be really
> nice to have something in I²C HID to
>
> set_the_same_affinity_as_parent/GPIO_irq()
>
You know I think this is only half of the problem. The interrupts need
to be aligned but so does the I2C traffic. This was something else that
Hans mentioned in the linked thread. It's a lot more complex to sync
everything up.
I'm tempted to have a helper that i2c-hid uses after everything is setup
to go and align the affinities rather than at probe.
> ...
>
>> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> Cc: Hans de Goede <hdegoede@redhat.com>
>
> You can move these (Cc lines) to be after ---, that they won't pollute
> the commit message with the same effect made on email, i.e. Cc'ing to
> the listed people.
>
Right; thanks.
prev parent reply other threads:[~2024-05-21 2:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 12:41 [PATCH] pinctrl: amd: Set up affinity for GPIO lines when enabling interrupt Mario Limonciello
2024-05-20 9:38 ` Andy Shevchenko
2024-05-21 2:01 ` Mario Limonciello [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=4ee142f5-7e21-4fdb-aadb-7328407e7c42@amd.com \
--to=mario.limonciello@amd.com \
--cc=Basavaraj.Natikar@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ktl@frame.work \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.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;
as well as URLs for NNTP newsgroup(s).