From owner-freebsd-arch Sun Sep 8 18:40:14 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D231637B400 for ; Sun, 8 Sep 2002 18:40:10 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 552CD43E3B for ; Sun, 8 Sep 2002 18:40:10 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020909014009.GYXL9751.sccrmhc01.attbi.com@InterJet.elischer.org>; Mon, 9 Sep 2002 01:40:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA54038; Sun, 8 Sep 2002 18:27:44 -0700 (PDT) Date: Sun, 8 Sep 2002 18:27:42 -0700 (PDT) From: Julian Elischer To: Jeff Roberson Cc: arch@freebsd.org Subject: UMA locks In-Reply-To: <20020822200207.S57142-100000@mail.chesapeake.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Is there a reason that the UMA CPU lock is a sleep lock? how log is it held? I would think it would only be held for brief moments? (e.g. to grab the per-cpu bucket list to do some work on it) Because it is a sleep lock, callers with the sched lock must drop it to free things (such as thread structures). I have a 'sidestep' around this but it requires holding my own global queue of freed threads (with its own spin lock) to hold freed items until I can get out enough to actually free them. The UMA code is so central to all sorts of other modules that if you briefly need a lock to manipulate it's per-cpu structures, it is possible a spinlock might be a better choice. (depending on how long you hold it for.) just a thought. julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message