mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Andrew Davis <afd@ti.com>
Cc: Peng Fan <peng.fan@nxp.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] remoteproc: core: Consolidate bool flags into 1-bit bitfields
Date: Fri, 10 Oct 2025 22:21:17 +0800	[thread overview]
Message-ID: <20251010142117.GC17199@nxa18884-linux.ap.freescale.net> (raw)
In-Reply-To: <9c8d708f-bf20-4dda-abf8-7896c820c611@ti.com>

Hi Andrew,

On Fri, Oct 10, 2025 at 08:01:10AM -0500, Andrew Davis wrote:
>On 10/5/25 9:14 AM, Peng Fan wrote:
>> Per Documentation/process/coding-style.rst rule 17 regarding the use of
>> bool types:
>> If a structure has many true/false values, consider consolidating them into
>> a bitfield with 1-bit members, or using an appropriate fixed-width type
>> such as u8.
>> 
>> This commit replaces multiple bool members in struct rproc with 1-bit
>> bitfields and groups them together. This change reduces the overall size of
>> struct rproc from 0x4d8 to 0x4c8 on ARM64.
>> 
>
>Most of the series looks good, but this patch I'm not a fan. This isn't
>a huge savings and bitfields come with many of their own challenges.

Thanks for giving a look on the patchset.

I could drop this change in V3. May I get your R-b for other patches?
(V2 was just posted out after fixed stm32_rproc build issue)

>
>> No functional changes.
>
>If the structure's size changed then that is a functional change. There

Got it.

>also is probably a performance change from extracting the value out of the
>bitfield, where before they might have each been an aligned width variable
>that could be tested in a single cycle.

Agree, but performance may not be critical here.

No problem, I could drop this patch. Let me wait to collect more comments.

Thanks,
Peng

>
>Andrew
>

      reply	other threads:[~2025-10-10 13:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-05 14:14 [PATCH 0/6] remoteproc: core: misc update Peng Fan
2025-10-05 14:14 ` [PATCH 1/6] remoteproc: core: Drop redundant initialization of 'ret' in rproc_shutdown() Peng Fan
2025-10-05 14:14 ` [PATCH 2/6] remoteproc: core: Sort header includes Peng Fan
2025-10-05 14:14 ` [PATCH 3/6] remoteproc: core: Removed unused headers Peng Fan
2025-10-05 14:14 ` [PATCH 4/6] remoteproc: core: Use cleanup.h macros to simplify lock handling Peng Fan
2025-10-05 14:14 ` [PATCH 5/6] remoteproc: core: Remove unused export of rproc_va_to_pa Peng Fan
2025-10-05 14:14 ` [PATCH 6/6] remoteproc: core: Consolidate bool flags into 1-bit bitfields Peng Fan
2025-10-10  8:44   ` kernel test robot
2025-10-10 13:01   ` Andrew Davis
2025-10-10 14:21     ` Peng Fan [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=20251010142117.GC17199@nxa18884-linux.ap.freescale.net \
    --to=peng.fan@oss.nxp.com \
    --cc=afd@ti.com \
    --cc=andersson@kernel.org \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=daniel.baluta@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=peng.fan@nxp.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

all inboxes | Powered by JetHome®