Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Nov 2000 00:46:23 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Jacques Fourie <jacques4i@yahoo.com>
Cc:        Warner Losh <imp@village.org>, freebsd-hackers@freebsd.org
Subject:   Re: kernel stack size? 
Message-ID:  <200011080846.eA88kNF00891@mass.osd.bsdi.com>
In-Reply-To: Your message of "Wed, 08 Nov 2000 00:35:11 PST." <20001108083511.25177.qmail@web3506.mail.yahoo.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> --- Warner Losh <imp@village.org> wrote:
> 
> > 10k lines in an interrupt routine sounds to be way
> > more work than you
> > want to do in an interrupt routine.  Maybe you could
> > use a work queue
> > and deal with it that way.  There isn't much I can
> 
> The ~10k lines of code is in a software interrupt
> (netisr) routine. In the hardware interrupt
> (ether_input() ) the packets are queued and the
> software interrupt scheduled. All the work is done in
> the software interrupt routine. Sorry if I did not
> explain this clearly before. Does everything discussed
> so far still apply? If so, I can't see any way to do
> this differently right now. Back to the drawing
> boards, I guess.

Basically, large stack variables are just wrong, and particularly wrong 
in anything called from interrupt context (that applies to netisrs as 
well).

It should be pretty straightforward to move your large variables 
elsewhere though, and a salutory lesson to you for next time. 8)

Note also that it's OK to call malloc if your storage is relatively 
persistent.  Without knowing why you need so much space, it's hard to 
offer you more constructive suggestions though.  Feel free to discuss at 
more length; many of us have been down this path already and can probably 
save you a lot of headscratching.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011080846.eA88kNF00891>