From: Peter Osterlund <petero2@telia.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: Phillip Susi <psusi@cfl.rr.com>, linux-kernel@vger.kernel.org
Subject: Re: pktcdvd stack usage regression
Date: 09 Feb 2006 07:01:25 +0100 [thread overview]
Message-ID: <m3lkwl6pfu.fsf@telia.com> (raw)
In-Reply-To: <20060209020932.GY3524@stusta.de>
Adrian Bunk <bunk@stusta.de> writes:
> Hi Phillip,
>
> your recent patch "pktcdvd: Allow larger packets" changed
> PACKET_MAX_SIZE in the pktcdvd driver from 32 to 128.
>
> Unfortunately, drivers/block/pktcdvd.c contains the following:
>
> <-- snip -->
>
> ...
> static void pkt_start_write(struct pktcdvd_device *pd, struct
> packet_data *pkt)
> {
> struct bio *bio;
> struct page *pages[PACKET_MAX_SIZE];
> int offsets[PACKET_MAX_SIZE];
> ...
>
> <-- snip -->
>
> With PACKET_MAX_SIZE=128, this allocates more than 1 kB on the stack
Yes, I know.
> which is not acceptable considering that we might have only 4 kB stack
> altogether.
Why is it not acceptable? The pkt_start_write() function is only
called from the kcdrwd() kernel thread and the pkt_start_write()
function doesn't call anything else in the kernel that could require
lots of stack space.
The actual I/O is started from pkt_iosched_process_queue(), which
calls generic_make_request(). However pkt_iosched_process_queue() is
on a different call chain than pkt_start_write(), so I don't see how
this could be a problem.
--
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340
next prev parent reply other threads:[~2006-02-09 6:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-09 2:09 pktcdvd stack usage regression Adrian Bunk
2006-02-09 6:01 ` Peter Osterlund [this message]
2006-02-10 14:39 ` Adrian Bunk
2006-02-10 20:56 ` Peter Osterlund
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=m3lkwl6pfu.fsf@telia.com \
--to=petero2@telia.com \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=psusi@cfl.rr.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.