Date: Sun, 30 Sep 2007 20:32:27 +0200 From: "Attilio Rao" <attilio@freebsd.org> To: "Alexander Motin" <mav@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: Kernel thread stack usage Message-ID: <3bbf2fe10709301132j441277e1web97323743d01560@mail.gmail.com> In-Reply-To: <46FFD850.1040508@FreeBSD.org> References: <46FFD850.1040508@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2007/9/30, Alexander Motin <mav@freebsd.org>: > Hi. > > As known in netgraph susbystem information passing from one node to > another by direct function calls without queueing. It gives performance > bonuses, but it also gives permanent stack overflow risk on complicated > graphs. Netgraph is still have a queues and able to use them when asked, > but now queueing is a flag which should be controlled by sending node. I > think it would be good to implement some algorithm which could monitor > stack usage on each call and enforce queueing when stack usage become > critical. > > The question is: is there correct way to somehow get current kernel > thread stack usage or just a stack base address? This should be stored in the pcb area of threads (for example, ia32 maintains a pcb_esp0 which points to the stack address at ring0 for the thread which points to). Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10709301132j441277e1web97323743d01560>