From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 1 15:48:44 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 002994E2; Fri, 1 Mar 2013 15:48:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0392F684; Fri, 1 Mar 2013 15:48:42 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA09987; Fri, 01 Mar 2013 17:48:41 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <5130CDD8.2050107@FreeBSD.org> Date: Fri, 01 Mar 2013 17:48:40 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130220 Thunderbird/17.0.3 MIME-Version: 1.0 To: mjacob@FreeBSD.org Subject: Re: memory allocation in spinlock context References: <5130B224.8000600@FreeBSD.org> <5130B990.2010001@freebsd.org> In-Reply-To: <5130B990.2010001@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 15:48:44 -0000 on 01/03/2013 16:22 Matthew Jacob said the following: > On 3/1/2013 5:50 AM, Andriy Gapon wrote: >> I am trying to understand if it is possible to allow memory allocations (M_NOWAIT, >> of course) in a spinlock context. >> > There are mechanisms to do just this- essentially by creating private pools that > are organized in a way to allow for spinlock (and thus possible interrupt level) > safe allocations (and failure if the pool is empty). Are you trying to make a > general mechanism for this? I am just pondering what would it take to develop such a general mechanism. -- Andriy Gapon