Re: Killing Giant for 13

Hans Petter Selasky <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <[email protected]>
Hi,

I've been pondering with some ideas around Giant removal too.

First of all, I think the first step getting rid of Giant, is to move 
all Giant usage related to newbus into two own global functions, so we 
can start working on what and how the device tree should be protected 
separately. Personally I would prefer a sleepable EPOCH (See 
https://reviews.freebsd.org/D30376), because that would interact nicely 
with freeing the device softc and other internal structures.

void
device_tree_lock()
{
     mtx_lock(&Giant);
}

void
device_tree_unlock()
{
     mtx_unlock(&Giant);
}

Secondly I think that if we can remove all code sleeping with Giant, so 
to speak, either by using msleep(&Giant) or by using M_NOWAIT, we can 
get rid of the DROP and PICKUP Giant macros, and get Giant out of the 
fast path in all of the kernel. Then if Giant i still around as a mutex, 
it won't have that much impact!

Warner, what is the status of your Giant work?

--HPS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.