From owner-cvs-src@FreeBSD.ORG Thu Apr 19 18:53:53 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B304116A400; Thu, 19 Apr 2007 18:53:53 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id A355913C44B; Thu, 19 Apr 2007 18:53:53 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3JIrrVP085304; Thu, 19 Apr 2007 18:53:53 GMT (envelope-from scottl@repoman.freebsd.org) Received: (from scottl@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3JIrrQQ085303; Thu, 19 Apr 2007 18:53:53 GMT (envelope-from scottl) Message-Id: <200704191853.l3JIrrQQ085303@repoman.freebsd.org> From: Scott Long Date: Thu, 19 Apr 2007 18:53:53 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/aic7xxx aic79xx.c aic79xx.h aic7xxx.c aic7xxx.h aic7xxx_inline.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 18:53:53 -0000 scottl 2007-04-19 18:53:53 UTC FreeBSD src repository Modified files: sys/dev/aic7xxx aic79xx.c aic79xx.h aic7xxx.c aic7xxx.h aic7xxx_inline.h Log: Up until now, the free SCB pool received only a small initial allocation, and new SCBs were allocated on demand later if needed. This has two problems. First, allocating SCBs involves allocating contiguous memory, and if memory is exhausted then the VM will try to page out to satisfy the request, leading to recursion and deadlock. The second problem is that it can cause lock order reversals due to parts of the VM still being under Giant. Fix the problem be allocating the full pool at driver attach, when it is safe to do so. Revision Changes Path 1.40 +13 -10 src/sys/dev/aic7xxx/aic79xx.c 1.27 +1 -1 src/sys/dev/aic7xxx/aic79xx.h 1.111 +7 -5 src/sys/dev/aic7xxx/aic7xxx.c 1.56 +1 -1 src/sys/dev/aic7xxx/aic7xxx.h 1.25 +2 -1 src/sys/dev/aic7xxx/aic7xxx_inline.h