From owner-freebsd-arch@FreeBSD.ORG Sun Sep 30 18:09:42 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1FAF16A41B for ; Sun, 30 Sep 2007 18:09:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD8213C45B for ; Sun, 30 Sep 2007 18:09:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.7.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 34508769 for freebsd-arch@freebsd.org; Sun, 30 Sep 2007 20:09:40 +0300 Message-ID: <46FFD850.1040508@FreeBSD.org> Date: Sun, 30 Sep 2007 20:09:36 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Kernel thread stack usage X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2007 18:09:42 -0000 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? -- Alexander Motin