From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 27 18:27:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAFA16A420 for ; Sun, 27 Jan 2008 18:27:09 +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 EC61713C448 for ; Sun, 27 Jan 2008 18:27:08 +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.14) with ESMTPA id 69673907; Sun, 27 Jan 2008 20:27:08 +0200 Message-ID: <479CCCF8.7030601@FreeBSD.org> Date: Sun, 27 Jan 2008 20:27:04 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: kstackusage() patch request for comments X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2008 18:27:09 -0000 Hi. I have made a patch http://www.mavhome.dp.ua/kstackusage.patch that implements machine dependent function returning current kernel thread stack usage statistics and uses it in netgraph subsystem for receiving maximum benefit from direct function calls and minimum queueing while keeping stack protected. As I have never developed machine-dependant things I would like to hear any comments about it. The main question I have is about source files and headers I should use for this specific purposes. Is it correct way to define function in machine independent header, but implement it in machdep.c? Or I should define it in machine dependent headers? Also I would be grateful for help with implementations of this function for arch different from i386/amd64. Thanks. -- Alexander Motin