From: Thierry Reding <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Lee Jones <lee.jones@linaro.org>,
Vladimir Zapolskiy <vz@mleia.com>,
linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH 2/3] pwm: lpc18xx-sct: Reduce number of devm memory allocations
Date: Tue, 1 Feb 2022 08:51:34 +0100 [thread overview]
Message-ID: <YfjmhhbDaEuaYKfb@orome> (raw)
In-Reply-To: <20211110084950.1053426-2-u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
On Wed, Nov 10, 2021 at 09:49:49AM +0100, Uwe Kleine-König wrote:
> Each devm allocations has an overhead of 24 bytes to store the related
> struct devres_node additionally to the fragmentation of the allocator.
> So allocating 16 struct lpc18xx_pwm_data (which only hold a single int)
> adds quite some overhead. Instead put the per-channel data into the
> driver data struct and allocate it in one go.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/pwm/pwm-lpc18xx-sct.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
This could've been merged with patch 3 to make it a bit more obvious why
this is useful. Patch 2 itself is a bit half-baked without patch 3. But
I'll apply these anyway.
Thanks,
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-02-01 7:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 8:49 [PATCH 1/3] pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add() Uwe Kleine-König
2021-11-10 8:49 ` [PATCH 2/3] pwm: lpc18xx-sct: Reduce number of devm memory allocations Uwe Kleine-König
2022-02-01 7:51 ` Thierry Reding [this message]
2021-11-10 8:49 ` [PATCH 3/3] pwm: lpc18xx-sct: Simplify driver by not using pwm_[gs]et_chip_data() Uwe Kleine-König
2022-02-01 7:47 ` [PATCH 1/3] pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add() Thierry Reding
2022-02-01 8:19 ` Uwe Kleine-König
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=YfjmhhbDaEuaYKfb@orome \
--to=thierry.reding@gmail.com \
--cc=kernel@pengutronix.de \
--cc=lee.jones@linaro.org \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vz@mleia.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