From owner-freebsd-arch Mon Sep 9 0:31:25 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 DBD7937B400; Mon, 9 Sep 2002 00:31:22 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 221BB43E4A; Mon, 9 Sep 2002 00:31:22 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id g897VCT22529; Mon, 9 Sep 2002 03:31:12 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Mon, 9 Sep 2002 03:31:12 -0400 (EDT) From: Jeff Roberson To: Julian Elischer Cc: Jon Mini , Subject: Re: UMA locks In-Reply-To: Message-ID: <20020909032849.W47384-100000@mail.chesapeake.net> 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 On Sun, 8 Sep 2002, Julian Elischer wrote: > > > On Sun, 8 Sep 2002, Jon Mini wrote: > > > Julian Elischer [julian@elischer.org] wrote : > > > > > 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.) > > > > Being able to uma_free while holding a spinlock would be very nice. > > of course we could always drop schedlock in thread_exit(), > or do what we do do, which is call thread_stash() instead of thread_free() > when we want to free the spare thread td_spare, but then we are doing > EXTRA locking ops... hmm > > schedlock is being helppd for some quite long periods. > It's probably worth looking at it some time.. > > I believe it is safe to turn uma per cpu locks into spin locks now. Go ahead and try and do some perf runs with it. The changes should be completely localized in uma_int.h. Look for the locking macros at the bottom. Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message