From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl.
Date: Mon, 21 Feb 2011 10:17:45 -0800 [thread overview]
Message-ID: <4D62AC49.3090600@oracle.com> (raw)
In-Reply-To: <4D611047.9010607@oracle.com>
On 02/20/2011 04:59 AM, Tristan Ye wrote:
> Joel, great catch, how did you builder get warning like that, needs
> to change makefile a bit?
>
> And we're not allowed to put structure more than 2k, on stack for each
> function in kernel?
In 32-bit kernels, the stack is set to 4K. In 64 bit, 8K. These are the
typical values chosen by various distros.
So using 2K is dangerous as it could easily lead to an overflow and oops/panic
the box.
There is no magic cut-off value for the max stack footprint for a function.
The number depends on the stack depth. Also we have no control on a lot of
functions in the stack. So we try to keep our footprint as small as possible.
BTW, you can run scripts/checkstack.pl to check the stack footprint of the
functions.
# objdump -d fs/ocfs2/ocfs2.ko | scripts/checkstack.pl
0x0001873a ocfs2_extend_dir [ocfs2]: 316
0x00044060 ocfs2_rename [ocfs2]: 316
0x0003b5af __ocfs2_recovery_thread [ocfs2]: 232
0x00046cd8 ocfs2_symlink [ocfs2]: 220
0x000762f6 ocfs2_xattr_set [ocfs2]: 220
(So 316 bytes is the current max footprint for a function in 32-bit builds.)
Sunil
next prev parent reply other threads:[~2011-02-21 18:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-30 6:25 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Adding new codes 'OCFS2_INFO_FREEINODE' and 'OCFS2_INFO_FREEFRAG' for o2info ioctl V2 Tristan Ye
2011-01-30 6:25 ` [Ocfs2-devel] [PATCH 1/3] Ocfs2: Using macro to set/clear *FILLED* flags in info handler Tristan Ye
2011-01-31 22:15 ` Mark Fasheh
2011-02-01 1:10 ` Joel Becker
2011-02-01 3:06 ` Mark Fasheh
2011-02-01 6:01 ` Joel Becker
2011-02-01 7:53 ` Tristan Ye
2011-02-01 17:37 ` Mark Fasheh
2011-02-01 7:48 ` Tristan Ye
2011-02-20 12:08 ` Joel Becker
2011-01-30 6:26 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-01-31 22:57 ` Mark Fasheh
2011-02-01 7:52 ` Tristan Ye
2011-02-20 12:07 ` Joel Becker
2011-02-20 12:59 ` Tristan Ye
2011-02-21 2:04 ` Joel Becker
2011-02-21 18:17 ` Sunil Mushran [this message]
2011-01-30 6:26 ` [Ocfs2-devel] [PATCH 3/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEFRAG' " Tristan Ye
-- strict thread matches above, loose matches on Subject: below --
2011-05-24 10:07 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Complete rest of o2info patches(v5) Tristan Ye
2011-05-24 10:07 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-03-29 2:11 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Complete rest of o2info patches Tristan Ye
2011-03-29 2:11 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-02-22 4:59 Tristan Ye
2011-02-22 6:09 ` Joel Becker
2011-02-22 8:02 ` Tristan Ye
2011-02-22 8:15 ` Joel Becker
2011-02-22 8:26 ` Tristan Ye
2011-02-18 4:26 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Adding new codes 'OCFS2_INFO_FREEINODE' and 'OCFS2_INFO_FREEFRAG' for o2info ioctl V3 Tristan Ye
2011-02-18 4:26 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2010-11-16 10:13 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Adding new codes 'OCFS2_INFO_FREEINODE' and 'OCFS2_INFO_FREEFRAG' for o2info ioctl V2 Tristan Ye
2010-11-16 10:13 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2010-12-07 1:07 ` Joel Becker
2010-12-07 1:46 ` Tristan Ye
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=4D62AC49.3090600@oracle.com \
--to=sunil.mushran@oracle.com \
--cc=ocfs2-devel@oss.oracle.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 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.