From: James Smart <james.smart@emulex.com>
To: Tomas Henzl <thenzl@redhat.com>
Cc: "'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] lpfc: lower stack use in lpfc_fc_frame_check
Date: Mon, 3 Jan 2011 08:53:21 -0500 [thread overview]
Message-ID: <4D21D4D1.1010208@emulex.com> (raw)
In-Reply-To: <4D121EC8.3090205@redhat.com>
Tomas,
Thank you.
Acked-by: James Smart <james.smart@emulex.com>
-- james s
On 12/22/2010 10:52 AM, Tomas Henzl wrote:
> Hi,
> according to checkstack the lpfc_fc_frame_check occupies the first place in stack usage:
> make checkstack
> objdump -d vmlinux $(find . -name '*.ko') | \
> perl /root/rpmbuild/BUILD/kernel-2.6.32/linux-2.6.32.x86_64/scripts/checkstack.pl x86_64
> 0x000013f4 lpfc_fc_frame_check [lpfc]: 1936
> ...
> This change makes the rctl_names static, thus not on stack.
>
> Tomas
>
> Signed-off-by: Tomas Henzl<thenzl@redhat.com>
>
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index e98e792..634b2fe 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -11578,7 +11578,8 @@ lpfc_sli4_post_scsi_sgl_block(struct lpfc_hba *phba, struct list_head *sblist,
> static int
> lpfc_fc_frame_check(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr)
> {
> - char *rctl_names[] = FC_RCTL_NAMES_INIT;
> + /* make rctl_names static to save stack space */
> + static char *rctl_names[] = FC_RCTL_NAMES_INIT;
> char *type_names[] = FC_TYPE_NAMES_INIT;
> struct fc_vft_header *fc_vft_hdr;
>
>
>
>
>
>
prev parent reply other threads:[~2011-01-03 13:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-22 15:52 [PATCH] lpfc: lower stack use in lpfc_fc_frame_check Tomas Henzl
2011-01-03 13:53 ` James Smart [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=4D21D4D1.1010208@emulex.com \
--to=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.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.