Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2002 18:27:42 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        arch@freebsd.org
Subject:   UMA locks
Message-ID:  <Pine.BSF.4.21.0209081820000.51214-100000@InterJet.elischer.org>
In-Reply-To: <20020822200207.S57142-100000@mail.chesapeake.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0209081820000.51214-100000>