Date: Thu, 15 Nov 2012 17:10:01 -0600 From: Alan Cox <alc@rice.edu> To: Warner Losh <imp@bsdimp.com> Cc: "Jayachandran C." <jchandra@freebsd.org>, mips@freebsd.org Subject: Re: ZERO_REGION_SIZE Message-ID: <50A57649.9020504@rice.edu> In-Reply-To: <DF2CB7FC-C1ED-4F4C-A39A-60B5E7FC566D@bsdimp.com> References: <50A53391.4080909@rice.edu> <CAJ-Vmon-v3K7012ti_L6ao3wQHfQ99Jau1kJ%2BGhumbPjAuSDww@mail.gmail.com> <50A54CCD.8070409@rice.edu> <DF2CB7FC-C1ED-4F4C-A39A-60B5E7FC566D@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/15/2012 3:07 PM, Warner Losh wrote: > On Nov 15, 2012, at 1:13 PM, Alan Cox wrote: >> P.S. I would encourage someone with hardware to look into implementing a >> non-iterative ffs*() using (d)clz. The MIPS pmap would benefit from >> this. Basically, most pmap_enter() calls are doing an ffs*(). > ffs finds the first bit set. clz counts the number of leading zeros and thus finds the last bit set. Would a non-iterative fls* be helpful? The code could probably use fls* in place of ffs*. In any case, there's a standard trick for using (d)clz to implement a non-iterative ffs*. Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50A57649.9020504>