From owner-svn-src-head@freebsd.org Mon May 23 20:30:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A03C7B471EF; Mon, 23 May 2016 20:30:17 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63AA519B5; Mon, 23 May 2016 20:30:17 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi0-x22a.google.com with SMTP id b65so152444488oia.1; Mon, 23 May 2016 13:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=EzJGHdNFwfJRUF+LeiBAXy5nx39idkDpEf1UYkH7eUc=; b=aiyfpFPJhv7vE/vuk/DIP7MjQLeh5THKMusQcfXUChM4S383m/R19NBXJNweNjJZaG hh7EqK01Zt/jADBYGSYfZr9fJPkYalkBUIFOE/FB07VauxN6YKSeEkfdCSvfHKd9iEBt 0lC/lZ02UBcLh/qpxsgXu13Y52JrucBgMovoGTgelGgPNT2Evo2xMdL/GOZvxHW8U5S0 UwTk8W+u3Gzu2Vy1/xJtlNYH4JXL1O/HRMyg4mStSIQp32Mb0jpKtpx7qIouzwYmB7lV gr25Iico7x7/siq7BICqnTAduwWf1LgP/Jg/tq7h1BxYA/49p2OFBqDMH++Y+9Ui0sed imwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=EzJGHdNFwfJRUF+LeiBAXy5nx39idkDpEf1UYkH7eUc=; b=CGmIaQxRx87C7fWXocDD90Y+xs0SJ2ZmacmdaRN8HUqEWK1u+H88ZBxacviGaBRM6v 3AOeoroBDreo6w4HcstV4jIza9HbgBr22Pz3Xa23BQz89Sxl9WTbaAKAYIYozIXHVhoF kxPtuLxvvtRkPTUcLd+ulGX0JTlyi12szCp0i6u2FYq0WkFbOc+6tFjWresj70EtOrdI +l6aXQBYXqqpCWCQzOPJscfV/vOb47bwpX+svNpL0ihLwDD/bPzM09Xht6HWhlDWA7dI ZqWRCrCjtgkxrrvJQIC1BZ5adGd06jIcXLfEpQSUxpJegVsLf8fXzN1FTlZQnCx+YgeO xvIg== X-Gm-Message-State: ALyK8tIH1KQ0wNDao5ih2wcPrASvgJam9mdS6rrLFlvUbwYK24kaOGwxB11dc/iCqri1goNpfBOMxmD2yOT+Mg== MIME-Version: 1.0 X-Received: by 10.157.27.173 with SMTP id z42mr493194otd.192.1464035416580; Mon, 23 May 2016 13:30:16 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.202.4.200 with HTTP; Mon, 23 May 2016 13:30:16 -0700 (PDT) In-Reply-To: <684f4a82-f48c-b2bb-6a72-5c1dfea11a39@pix.net> References: <201605042234.u44MYBMX054443@repo.freebsd.org> <2368543.Vvp613SNcD@ralph.baldwin.cx> <684f4a82-f48c-b2bb-6a72-5c1dfea11a39@pix.net> Date: Mon, 23 May 2016 14:30:16 -0600 X-Google-Sender-Auth: uNB6gvzIkIIOrgOc5nyA8TuCFDM Message-ID: Subject: Re: svn commit: r299090 - in head: etc/mtree include lib/libbluetooth sbin/hastd share/man/man3 sys/dev/xen/blkback sys/kern sys/net sys/sys tests/sys tests/sys/sys usr.sbin/bluetooth/hccontrol From: Alan Somers To: Kurt Lidl Cc: John Baldwin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 20:30:17 -0000 On Fri, May 6, 2016 at 8:45 AM, Kurt Lidl wrote: > On 5/5/16 12:31 PM, John Baldwin wrote: > >> On Wednesday, May 04, 2016 10:34:11 PM Alan Somers wrote: >> >>> Author: asomers >>> Date: Wed May 4 22:34:11 2016 >>> New Revision: 299090 >>> URL: https://svnweb.freebsd.org/changeset/base/299090 >>> >>> Log: >>> Improve performance and functionality of the bitstring(3) api >>> >>> Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which >>> allow >>> for efficient searching of set or cleared bits starting from any bit >>> offset >>> within the bit string. >>> >>> Performance is improved by operating on longs instead of bytes and >>> using >>> ffsl() for searches within a long. ffsl() is a compiler builtin in both >>> clang and gcc for most architectures, converting what was a brute force >>> while loop search into a couple of instructions. >>> >>> All of the bitstring(3) API continues to be contained in the header >>> file. >>> Some of the functions are large enough that perhaps they should be >>> uninlined >>> and moved to a library, but that is beyond the scope of this commit. >>> >> >> Doesn't switching from bytes to longs break the ABI? That is, setting >> bit 9 >> now has a different representation on big-endian systems (0x00 0x01 >> before, >> now 0x00 0x00 0x01 0x00 on 32-bit BE, and 4 more leading 0 bytes on >> 64-bit). >> This means you can't have an object file compiled against the old header >> pass a bitstring to an object file compiled against the new header on >> big-endian >> systems. >> >> Even on little-endian systems if an old object file allocates storage for >> a >> bitstring the new code might read off the end of it and fault (or return >> garbage if bits are set in the extra bytes it reads off the end)? >> >> Is the API is so little used we don't care? >> >> > Just as a note - at my prior job (Pi-Coral, now defunct) we used this > API everywhere in the dataplane code of our product. Since the company > is gone, that particular use-case doesn't matter anymore. > > At the very least, this deserves a mention in the release notes, and > also UPDATING! > > -Kurt > > UPDATING is updated as of r300539. Any objection to merging this to stable/10?