From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 1 14:22:20 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A74FF4B5 for ; Fri, 1 Mar 2013 14:22:20 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 69E6BF88 for ; Fri, 1 Mar 2013 14:22:19 +0000 (UTC) Received: from [192.168.135.7] (76-14-49-207.sf-cable.astound.net [76.14.49.207]) (authenticated bits=0) by ns1.feral.com (8.14.6/8.14.4) with ESMTP id r21EMCMP087292 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 1 Mar 2013 06:22:12 -0800 (PST) (envelope-from mjacob@freebsd.org) Message-ID: <5130B990.2010001@freebsd.org> Date: Fri, 01 Mar 2013 06:22:08 -0800 From: Matthew Jacob Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: memory allocation in spinlock context References: <5130B224.8000600@FreeBSD.org> In-Reply-To: <5130B224.8000600@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ns1.feral.com [192.67.166.1]); Fri, 01 Mar 2013 06:22:12 -0800 (PST) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mjacob@freebsd.org 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 14:22:20 -0000 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?