All of lore.kernel.org
 help / color / mirror / Atom feed
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 0/5] Remove onstack cpumask var usage
Date: Fri, 19 Apr 2024 07:13:50 +0200	[thread overview]
Message-ID: <20240419051350.GA558245@ravnborg.org> (raw)
In-Reply-To: <20240418104949.3606645-1-dawei.li@shingroup.cn>

Hi Dawei,

On Thu, Apr 18, 2024 at 06:49:44PM +0800, Dawei Li wrote:
> Hi,
> 
> This series aims at removing on-stack cpumask var usage for sparc arch.
> 
> Generally 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.

Took a quick look at the patches, looks good except the one the bot
already complained about.
A quick grep shows a few more cases where we have an on-stack cpumask
in sparc code.

kernel/ds.c:    cpumask_t mask;
kernel/leon_kernel.c:   cpumask_t mask;
kernel/leon_smp.c:static void leon_cross_call(void *func, cpumask_t mask, unsigned long arg1,
kernel/sun4d_smp.c:static void sun4d_cross_call(void *func, cpumask_t mask, unsigned long arg1,

Do you plan to look at the other on-stack users too?
It would be nice to see them all gone in one patch-set.

	Sam

  parent reply	other threads:[~2024-04-19  5:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 10:49 [PATCH 0/5] Remove onstack cpumask var usage Dawei Li
2024-04-18 10:49 ` [PATCH 1/5] sparc/srmmu: Remove on-stack cpumask var Dawei Li
2024-04-18 10:49 ` [PATCH 2/5] sparc/irq: " Dawei Li
2024-04-19  0:19   ` kernel test robot
2024-04-18 10:49 ` [PATCH 3/5] sparc/of: " Dawei Li
2024-04-18 10:49 ` [PATCH 4/5] sparc/pci_msi: " Dawei Li
2024-04-18 10:49 ` [PATCH 5/5] sparc: " Dawei Li
2024-04-19  5:13 ` Sam Ravnborg [this message]
2024-04-19  9:26   ` [PATCH 0/5] Remove onstack cpumask var usage Dawei Li
2024-04-19 20:33     ` Sam Ravnborg
2024-04-19 22:13     ` Yury Norov

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=20240419051350.GA558245@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.