From owner-freebsd-mips@FreeBSD.ORG Thu Nov 15 22:03:03 2012 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4485C92 for ; Thu, 15 Nov 2012 22:03:03 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 719D98FC16 for ; Thu, 15 Nov 2012 22:03:03 +0000 (UTC) Received: by mail-gg0-f182.google.com with SMTP id l1so444573ggn.13 for ; Thu, 15 Nov 2012 14:02:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=d+pBdq9xAiFnWchRiDMBy3cDtQ4FJW7JnwMfoEWNdpQ=; b=MnaA1qSu5KAHJaiN759ip2ozQk7d4QVhF7Pe7XkfwrxoPuPKaHnZc0imIyM1H7nfZK 01ny0rk8R2Dyi1lVAn46s9onEkWPRqBR3d4fnfTVzbuZ+ZOgICCdMmF1VNdyznd1S9sp nYKl7whgR6OaolWvQtqZgER709wNdIeGY3yW+UbV5x4yCQMfMmKq390wC/bte3SVjbua 0Oo39Z2zmOCsv61qT5VuhH/q7yo1oDLJR6WuJ2AheDEwO5j3bTQfAQ4M1ngkUXoNxDDm Gx494XD4Ho8EQ0m9mc76d5MpQLsIrC5pLw2p1DNYhQtw1bQwREqBqL7Nzx+NbjsilG6a YOeg== Received: by 10.101.151.4 with SMTP id d4mr699885ano.21.1353016977263; Thu, 15 Nov 2012 14:02:57 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.147.83.18 with HTTP; Thu, 15 Nov 2012 14:02:37 -0800 (PST) In-Reply-To: References: <50A53391.4080909@rice.edu> <50A54CCD.8070409@rice.edu> From: Juli Mallett Date: Thu, 15 Nov 2012 14:02:37 -0800 X-Google-Sender-Auth: oeigH5X0M1fL_NpcJlfOKncudTU Message-ID: Subject: Re: ZERO_REGION_SIZE To: Warner Losh X-Gm-Message-State: ALoCoQnxKeAtNMvA6edFhIZUef2giaLgZW2ckJ2UFpn+KkerHJbdSObwZj/wlvUCCPHpBDacYL4e Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "Jayachandran C." , "freebsd-mips@FreeBSD.org" , Alan Cox X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 22:03:04 -0000 On Thu, Nov 15, 2012 at 1: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? > 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.