From owner-freebsd-current@FreeBSD.ORG Wed Jun 12 18:37:05 2013 Return-Path: Delivered-To: current@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 47FB754E for ; Wed, 12 Jun 2013 18:37:05 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 3A4BB19DD for ; Wed, 12 Jun 2013 18:37:05 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 59C101A3C2F; Wed, 12 Jun 2013 11:36:59 -0700 (PDT) Message-ID: <51B8BFC4.303@mu.org> Date: Wed, 12 Jun 2013 11:36:52 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Luigi Rizzo Subject: Re: copyin()/copyout() constraints ? References: <20130612180115.GA27892@onelab2.iet.unipi.it> In-Reply-To: <20130612180115.GA27892@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2013 18:37:05 -0000 On 6/12/13 11:01 AM, Luigi Rizzo wrote: > hi, > is it possible to run copyin() or copyout() in one of these cases: > 1. while holding a spinlock > 2. while holding a regular mutex/lock > 3. while holding a read lock (on an RWLOCK or RMLOCK) > 4. while holding a write lock (on an RWLOCK or RMLOCK) > > I suspect #1 is forbidden, but am a bit unclear for the > other cases. No on all of the above unless the memory is wired. You need a sx or semaphore. -Alfred > > thanks > luigi > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- Alfred Perlstein VP Software Engineering, iXsystems