Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2012 14:02:37 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "Jayachandran C." <jchandra@freebsd.org>, "freebsd-mips@FreeBSD.org" <mips@freebsd.org>, Alan Cox <alc@rice.edu>
Subject:   Re: ZERO_REGION_SIZE
Message-ID:  <CACVs6=9ZiVeWcJUoeNU_Mybn5WgZ2edUkx4ERPEXD%2BPODp8gKw@mail.gmail.com>
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 Thu, Nov 15, 2012 at 1:07 PM, Warner Losh <imp@bsdimp.com> 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?
>

Right.  And no widespread ctz/ffs MIPS instructions as far as I know.  We
could use pop/dpop on processors that support them to do non-iterative
ffs*, with a few additional instructions, though.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACVs6=9ZiVeWcJUoeNU_Mybn5WgZ2edUkx4ERPEXD%2BPODp8gKw>