From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 12 10:55:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC53516A400 for ; Sun, 12 Mar 2006 10:55:08 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87A5743D45 for ; Sun, 12 Mar 2006 10:55:08 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: by wproxy.gmail.com with SMTP id 50so947072wri for ; Sun, 12 Mar 2006 02:55:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=hU8zegeBuLIiZNxl+dhs6grffdb3Fq47NdMxQg64OK2yovcaV3gCkUdSuGodLuZWB7mxhmmFwj5J66bIDt0/7MtV4OgIiM/GavCGShcxlEeNVkwobRxyMyFwG7nwARG9SpyOpPI/iZ6qAvnUmVSCdqlkGper79l31M3u0tfQGC0= Received: by 10.54.69.19 with SMTP id r19mr2635499wra; Sun, 12 Mar 2006 02:55:07 -0800 (PST) Received: by 10.54.102.7 with HTTP; Sun, 12 Mar 2006 02:55:07 -0800 (PST) Message-ID: Date: Sun, 12 Mar 2006 16:25:07 +0530 From: "Pranav Peshwe" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Doubts about PICKUP_GIANT() and mtx_lock(&Giant). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 10:55:09 -0000 Hello, What is effectively the difference between PICKUP/DROP_GIANT and mtx_lock/unlock(&Giant) ? From the macro expansion, i surmise that PICKUP/DROP_GIANT deals with recursion in Giant locking.Is this correct ? i= s this the only difference ? What will happen if i mix the usage of PICKUP/DROP_GIANT and mtx_lock/unlock(&Giant) ? Also,is there any hard and fast rule prescribing which method of taking the Giant should be used where in the kernel ? TIA. Regards, Pranav --------------------------------------------------------------------------- To argue with a person who has renounced the use of reason is like administering medicine to the dead. -- Thomas Paine