[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSAux4n-1hzHfD6L@smile.fi.intel.com>
Date: Fri, 21 Nov 2025 11:20:07 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: Jisheng Zhang <jszhang@...nel.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Doug Berger <opendmb@...il.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Hoan Tran <hoan@...amperecomputing.com>,
Andy Shevchenko <andy@...nel.org>, Daniel Palmer <daniel@...ngy.jp>,
Romain Perier <romain.perier@...il.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Kevin Hilman <khilman@...nel.org>,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Shubhrajyoti Datta <shubhrajyoti.datta@....com>,
Srinivas Neeli <srinivas.neeli@....com>,
Michal Simek <michal.simek@....com>, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCH v2 05/15] gpio: pxa: Use modern PM macros
On Thu, Nov 20, 2025 at 09:48:30PM +0100, Robert Jarzmik wrote:
> Jisheng Zhang <jszhang@...nel.org> writes:
> > On Tue, Nov 18, 2025 at 11:03:41PM +0100, Robert Jarzmik wrote:
> >
> > hmm, each controller adds 16bytes, then even on 100 controller platforms
> > 1600bytes. 1600 Bytes/64MB ~= 0.238%. it's trival. And is there such
> > platform?
> Yes, actually most of them have around 64MB, at least the pxa25x and pxa27x.
> The pxa3xx might have more (thing 128MB, maybe 256MB).
> There are very old platforms, we're in 2003/2004 there ...
>
> > From another side, recently UP support is removed from the core sched,
> > that removing adds more .text and .data overhead, so if the users really
> > care about this kind of 16bytes, it means he(she) can't afford even the
> > 16Bytes overhead, then I bet he(she) the always SMP in core sched, so
> > why not stick with the old kernel? What do you think?
> I think I would go with Andy's proposal, decouple the changes :
> - keep your changes in the PM callbaks
> - remove your change (put back the ifdef) in the data structure
It can't be done like this, unfortunately.
Either we need to waste a pointer and kmalloc() overheads at runtime, or keep
these bytes for !PM cases.
Alternatively we can drop this change and simply add a comment explaining
the memory requirements and why we don't want to always waste those bytes.
Ideally would be good to have some kind of struct_group() macro that is
dependent on IS_ENABLED() case. It may help in many cases like this then.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists