From owner-freebsd-mips@FreeBSD.ORG Thu Nov 15 21:07:35 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 4E357AE9 for ; Thu, 15 Nov 2012 21:07:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 010008FC12 for ; Thu, 15 Nov 2012 21:07:34 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id 16so2680599obc.13 for ; Thu, 15 Nov 2012 13:07:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=2/OxbfAa8raVrEoZZtgcrcCzXjlNwQAWrKKO4aR0qnY=; b=PLBhDHHzML6XiTclB/zr7tWk+ZCIz/fgTgkL7SpjfOOoRlrJ7QWZogc7CA8vp+uf1b VCE0pEPXutTPrkLMvdmbwjScZYg0SYBZQ+3tZP3RkgocPe2x/Qq030TSX7FoXoOECqI5 Ak0hIqEhxH16r+zGyx/MKLaDHamxhoZVtVvYtZw0nh26kxo7l44jPfQRW4LbwjT0u6kl UTUaTDE+o58YF1V3a2j8IV5OrzFoO0xoqjd8NMZ8Ia22mLHKEbXBZTfUZr1p85DIGYrL Faz9/tGgN2NXB9B9QtIJGJuIbtR8UI18dfQ0M5n5ihH4g8W+PYOJ3paxd7lxM2XTViML ARzw== Received: by 10.60.22.33 with SMTP id a1mr2033021oef.97.1353013654071; Thu, 15 Nov 2012 13:07:34 -0800 (PST) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id l9sm13262195oec.5.2012.11.15.13.07.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 13:07:31 -0800 (PST) Sender: Warner Losh Subject: Re: ZERO_REGION_SIZE Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <50A54CCD.8070409@rice.edu> Date: Thu, 15 Nov 2012 14:07:28 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <50A53391.4080909@rice.edu> <50A54CCD.8070409@rice.edu> To: Alan Cox X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQl7U0Sw0xoT9zVVzzJrs7WRACS7Kwj3mAa6WqnquAREnzlA9JaUrsm1wxtIiS0u8mUb/smK Cc: "Jayachandran C." , mips@freebsd.org 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 21:07:35 -0000 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? Warner