Expand ktr mask to 64 bits

John Baldwin jhb at freebsd.org
Tue May 19 21:29:40 UTC 2015


A common topic has been that the current set of KTR masks is bursting at the
seams.  I've wanted to fix it by providing some sort of per-class mask and
other stuff in the past.  However, just changing the masks from int to
uint64_t will double the bits we have to work with.  It's also a very simple
change.  It turns out we don't actually need to update the mask with atomic
ops anyway since the downside of losing races while changing ktr_mask is
pretty minor (may get fewer or more traces).  Plus, we don't mark ktr_mask
as volatile, so the compiler is free to cache its value anyway making several
of those races far wider than worrying about changes to two adjacent words.

I've put the diff up at https://reviews.freebsd.org/D2595 for anyone who'd
like to review.

-- 
John Baldwin


More information about the freebsd-arch mailing list