From owner-freebsd-hackers Sun Aug 5 12:55:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id C0D5437B403 for ; Sun, 5 Aug 2001 12:55:47 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.4/8.11.2) id f75Jtk882156; Sun, 5 Aug 2001 12:55:46 -0700 (PDT) (envelope-from dillon) Date: Sun, 5 Aug 2001 12:55:46 -0700 (PDT) From: Matt Dillon Message-Id: <200108051955.f75Jtk882156@earth.backplane.com> To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Allocate a page at interrupt time References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :I should have guessed the reason. Matthew Dillon answered this question on :Fri, 2 Jun 2000 as follows: : : : The VM routines that manage pages associated with objects are not : protected against interrupts, so interrupts aren't allowed to change : page-object associations. Otherwise an interrupt at just the wrong : time could corrupt the mainline kernel VM code. : : :On Thu, 2 Aug 2001, Zhihui Zhang wrote: : :> :> FreeBSD can not allocate from the PQ_CACHE queue in an interrupt context. :> Can anyone explain it to me why this is the case? :> :> :> Thanks, Yes, that is precisely the reason. In -current this all changes, though, since interrupts are now threads. *But*, that said, interrupts cannot really afford to hold mutexes that might end up blocking them for long periods of time so I would still recommend that interrupt code not attempt to allocate pages out of PQ_CACHE. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message