From owner-cvs-all@FreeBSD.ORG Sun Mar 21 16:41:42 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6921B16A4CE; Sun, 21 Mar 2004 16:41:42 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6505743D2F; Sun, 21 Mar 2004 16:41:42 -0800 (PST) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i2M0fgGe050954; Sun, 21 Mar 2004 16:41:42 -0800 (PST) (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i2M0fgTg050950; Sun, 21 Mar 2004 16:41:42 -0800 (PST) (envelope-from wpaul) Message-Id: <200403220041.i2M0fgTg050950@repoman.freebsd.org> From: Bill Paul Date: Sun, 21 Mar 2004 16:41:41 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ntoskrnl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 00:41:42 -0000 wpaul 2004/03/21 16:41:41 PST FreeBSD src repository Modified files: sys/compat/ndis kern_ndis.c ntoskrnl_var.h subr_ntoskrnl.c Log: The Intel 2200BG NDIS driver does an alloca() of about 5000 bytes when it associates with a net. Because FreeBSD's kstack size is only 2 pages by default, this blows the stack and causes a double fault. To deal with this, we now create all our kthreads with 8 stack pages. Also, we now run all timer callouts in the ndis swi thread (since they would otherwise run in the clock ithread, whose stack is too small). It happens that the alloca() in this case was occuring within the interrupt handler, which was already running in the ndis swi thread, but I want to deal with the callouts too just to be extra safe. NOTE: this will only work if you update vm_machdep.c with the change I just committed. If you don't include this fix, setting the number of stack pages with kthread_create() has essentially no effect. Revision Changes Path 1.44 +4 -2 src/sys/compat/ndis/kern_ndis.c 1.11 +7 -0 src/sys/compat/ndis/ntoskrnl_var.h 1.30 +21 -6 src/sys/compat/ndis/subr_ntoskrnl.c