From: Sam Ravnborg <sam@ravnborg.org>
To: Dawei Li <dawei.li@shingroup.cn>
Cc: davem@davemloft.net, andreas@gaisler.com,
sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 6/6] sparc/leon: Remove on-stack cpumask var
Date: Tue, 23 Apr 2024 19:29:43 +0200 [thread overview]
Message-ID: <20240423172943.GA903763@ravnborg.org> (raw)
In-Reply-To: <20240423083043.3735921-7-dawei.li@shingroup.cn>
On Tue, Apr 23, 2024 at 04:30:43PM +0800, Dawei Li wrote:
> In general it's preferable to avoid placing cpumasks on the stack, as
> for large values of NR_CPUS these can consume significant amounts of
> stack space and make stack overflows more likely.
>
> Use cpumask_subset() and cpumask_first_and() to avoid the need for a
> temporary cpumask on the stack.
>
> Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Looks fine.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
prev parent reply other threads:[~2024-04-23 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 8:30 [PATCH v3 0/6] Remove onstack cpumask var for sparc Dawei Li
2024-04-23 8:30 ` [PATCH v3 1/6] sparc/srmmu: Remove on-stack cpumask var Dawei Li
2024-04-23 8:30 ` [PATCH v3 2/6] sparc/irq: " Dawei Li
2024-04-23 8:30 ` [PATCH v3 3/6] sparc/of: " Dawei Li
2024-04-23 8:30 ` [PATCH v3 4/6] sparc/pci_msi: " Dawei Li
2024-04-23 8:30 ` [PATCH v3 5/6] sparc/init: " Dawei Li
2024-04-23 17:32 ` Sam Ravnborg
2024-04-23 8:30 ` [PATCH v3 6/6] sparc/leon: " Dawei Li
2024-04-23 17:29 ` Sam Ravnborg [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=20240423172943.GA903763@ravnborg.org \
--to=sam@ravnborg.org \
--cc=andreas@gaisler.com \
--cc=davem@davemloft.net \
--cc=dawei.li@shingroup.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@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