From: Benjamin Coddington <bcodding@redhat.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: linux-nfs@vger.kernel.org,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] nfs: reduce stack usage of nfs_get_root
Date: Wed, 27 Sep 2023 09:45:25 -0400 [thread overview]
Message-ID: <BAF96CD3-98A1-4D61-B188-BBCFBE81EA22@redhat.com> (raw)
In-Reply-To: <20230927001624.750031-1-npiggin@gmail.com>
On 26 Sep 2023, at 20:16, Nicholas Piggin wrote:
> Move fsinfo allocation off stack, reducing stack overhead of
> nfs_get_root from 304 to 192 bytes.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> Hi,
>
> This is motivated by a stack overflow described here:
> https://lore.kernel.org/netdev/20230927001308.749910-1-npiggin@gmail.com/
>
> NFS is not really a major culprit but it seems not too hard to
> shrink the stack a little.
>
> Thanks,
> Nick
Looks good, might be able to get rid of the local "root" var too if the
compiler doesn't optimize it away.
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Ben
prev parent reply other threads:[~2023-09-27 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 0:16 [RFC PATCH] nfs: reduce stack usage of nfs_get_root Nicholas Piggin
2023-09-27 13:45 ` Benjamin Coddington [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=BAF96CD3-98A1-4D61-B188-BBCFBE81EA22@redhat.com \
--to=bcodding@redhat.com \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=trond.myklebust@hammerspace.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