Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2001 13:15:26 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Alfred Perlstein <bright@mu.org>, Poul-Henning Kamp <phk@freebsd.org>, arch@freebsd.org
Subject:   Re: Kernel stack size and stacking: do we have a problem ?
Message-ID:  <XFMail.011220131526.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0112201244380.46573-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 20-Dec-01 Julian Elischer wrote:
> 
> 
> On Thu, 20 Dec 2001, John Baldwin wrote:
> 
>> 
>> On 20-Dec-01 Julian Elischer wrote:
>> > basically yes, after N levels, switch to what netisr() does.
>> > then you get another N levels :-) The reason I hadn't checked it in is
>> > because I was thinking about whether it should be N levels or N bytes of
>> > stack used....
>> 
>> It should be based on how much stack room is left.
> yes that is what I was thinking..
> 
> curthread->kstack is the last valid location so it's actually very easy.
> 
> But I wanted to actually 'drop' the packet if it went through 
> a total of some maximum number of nodes allowed..
> e.g. 64..  I can't imagine a practical application that requires a packet
> to go through 64 successive layers of en(de)capsulation.. :-)
> 
> It may be worth keeping a counter AND doing the stack check.

The counter is something that is netgraph specific.  The idea of checking the
stack and pushing the work off onto a thread if we run out of room isn't. :)

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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




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