Date: Mon, 16 Nov 2015 19:25:54 -0500 (EST) From: Benjamin Kaduk <kaduk@MIT.EDU> To: Warner Losh <imp@bsdimp.com> Cc: Justin Hibbits <chmeeedalf@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: CFT: uintmax_t rman Message-ID: <alpine.GSO.1.10.1511161923000.26829@multics.mit.edu> In-Reply-To: <0F3B8FF2-E54E-446F-8D4E-415A1111EF4D@bsdimp.com> References: <75C2B97F-3C5E-49E3-A584-DE84463889FC@gmail.com> <0F3B8FF2-E54E-446F-8D4E-415A1111EF4D@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 16 Nov 2015, Warner Losh wrote: > > > > On Nov 15, 2015, at 9:13 PM, Justin Hibbits <chmeeedalf@gmail.com> wrot= e: > > > > (Attempted to send this yesterday, but appears it didn't go through. A= pologies if it really did go through). > > > > As part of a project getting FreeBSD on the Freescale P5020 SoC, I incr= eased the width of resources, from u_long(32 bits on 32-bit archs, 64 bits = on 64-bit archs) to uintmax_t (currently 64 bits on all archs). I have it = working on PowerPC, but have not tested it on any other architecture, I hav= e no other systems to test it with, so I need help. This passes a tinderbo= x build. I need this tested on other archs, the more the better, especiall= y i386, including PAE. > > > > It should be effectively a no-op on most architectures, especially 64-b= it archs, though there were some checks I found in x86 code clamping addres= s checks to under 4GB, commented as necessary purely for rman. If this isn= 't the case, and we can't yet handle the checks being removed, they can go = in, but that needs testing. It should apply cleanly to recent head. > > I like the idea. There=A2s nothing offensive enough in the diffs to comme= nt upon here (though I suppose I could see a few spots one could quibble ov= er if one were so inclined). > > I wonder, though, why not make its own typedef, even if it is just > =A1typedef man_res_t uintmax_t;=A2 in the rman headers? Channeling my inner bde (maybe?), the typedef is probably helpful, but uintmax_t seems less so. uintmax_t has no guaranteed ABI, so a fixed-width type like uint64_t seems beter, assuming that uintmax_t is currently uint64_t everywhere (which I think is the case but did not verify). -Ben From owner-freebsd-current@freebsd.org Tue Nov 17 02:13:22 2015 Return-Path: <owner-freebsd-current@freebsd.org> Delivered-To: freebsd-current@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 7CF31A30E54 for <freebsd-current@mailman.ysv.freebsd.org>; Tue, 17 Nov 2015 02:13:22 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 635141303; Tue, 17 Nov 2015 02:13:22 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from Alfreds-MacBook-Pro-2.local (unknown [IPv6:2601:645:8004:7515:6d56:aa8e:b437:27b3]) by elvis.mu.org (Postfix) with ESMTPSA id A601D345A921; Mon, 16 Nov 2015 18:13:16 -0800 (PST) Subject: Re: libXO-ification - Why - and is it a symptom of deeper issues? To: Allan Jude <allanjude@freebsd.org>, freebsd-current@freebsd.org References: <0650CA79-5711-44BF-AC3F-0C5C5B6E5BD9@rdsor.ro> <CAJ-Vmokfo_BGWji9TrgQ40oRxqht9-2iEZVon7aQxR_93Ufxyg@mail.gmail.com> <702A1341-FB0C-41FA-AB95-F84858A7B3A4@rdsor.ro> <CAJ-VmoniBAmWTf9MkCCMYhRbPLc=0+z5kRSijXfqX9VZvm8jDg@mail.gmail.com> <5648C60B.6060205@freebsd.org> <6EDFB74B-2206-46E7-85F7-8DE05FB6D325@gmail.com> <5648CA60.3060800@freebsd.org> From: Alfred Perlstein <alfred@freebsd.org> Organization: FreeBSD Message-ID: <564A8D3C.2080900@freebsd.org> Date: Mon, 16 Nov 2015 18:13:16 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5648CA60.3060800@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 17 Nov 2015 02:13:22 -0000 On 11/15/15 10:09 AM, Allan Jude wrote: > On 2015-11-15 13:06, Garrett Cooper wrote: >>> On Nov 15, 2015, at 09:51, Andrey Chernov <ache@freebsd.org> wrote: >>> >>>> On 15.11.2015 20:37, Adrian Chadd wrote: >>>>> On 15 November 2015 at 09:10, Dan Partelly <dan_partelly@rdsor.ro> wrote: >>>>> Meaning, is that simple to push things in head , if somone does the work, even with with no proper review of the problem at hand , and the proposed solutions ? >>>> Nope and yup. The juniper folk had a solution to a problem multiple >>>> people had requested work on, and their proposal was by far the >>>> furthest along code and use wise. >>>> >>>> It's all fine and good making technical decisions based on drawings >>>> and handwaving and philosophizing, but at some point someone has to do >>>> the code. Juniper's libxo was the furthest along in implementation and >>>> production. >>> It seems it is the only and final argument for libXO existence. I >>> remember 2 or 3 discussions against libXO spontaneously happens in the >>> FreeBSD lists, all ended with that, approximately: "we already have the >>> code and you have just speculations". Alternative and more architecture >>> clean ideas, like making standalone template-oriented parser probably >>> based on liXO, are never seriously considered, because nobody will code >>> it, not for other reasons. >> We lack a [dtd/json] spec for tools, so programming for xo'ification doesn't seems like the best idea in the world to me from a end-user sysadmin/developer perspective. >> >> I could just as easily use standard tools like awk, grep, sed, and more advanced languages like perl or Python to parse output, and assuming output doesn't get a major rewrite, I'd just go with that method that's worked pretty well for me over the last 10 years of my career.. >> >> > The big difference is, a json parser isn't going to blow up if a new > field gets added in the middle, and your awk/grep/sed script probably will. > Alan is exactly correct. This is EXACTLY why it is important. It allows us to focus on the text UI without worrying about the 5000 tools built to parse the output of the utilities. It allows us to grow a useful text UI. Second is that parsing is as simple as doing "json2struct()" in whatever language you're using and then selecting a field as opposed to writing terrible regex. It's basically "libification" of the program without actual libification. Next step is to actually libify the programs. Libifying the programs would be VERY, VERY cool. But "libification" doesn't make json output not useful. -Alfred
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1511161923000.26829>