From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Subject: Re: [PATCH v3 3/4] x86/efi: print size in binary units in efi_print_memmap Date: Thu, 28 Jan 2016 09:29:59 +0000 Message-ID: <20160128092959.GA2571@codeblueprint.co.uk> References: <1453560913-134672-4-git-send-email-andriy.shevchenko@linux.intel.com> <1453567445.2470.24.camel@HansenPartnership.com> <94D0CD8314A33A4D9D801C0FE68B40295BF3B840@G9W0745.americas.hpqcorp.net> <1453748172.2363.36.camel@HansenPartnership.com> <1453751131.2363.54.camel@HansenPartnership.com> <94D0CD8314A33A4D9D801C0FE68B40295BF3BBD3@G9W0745.americas.hpqcorp.net> <20160126115041.GA7478@codeblueprint.co.uk> <1453809566.2521.239.camel@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1453809566.2521.239.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Shevchenko Cc: "Elliott, Robert (Persistent Memory)" , Andy Shevchenko , James Bottomley , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Rasmus Villemoes , Andrew Morton , "linux-kernel @ vger . kernel . org" List-Id: linux-efi@vger.kernel.org On Tue, 26 Jan, at 01:59:26PM, Andy Shevchenko wrote: > On Tue, 2016-01-26 at 11:50 +0000, Matt Fleming wrote: > > On Mon, 25 Jan, at 08:37:58PM, Elliott, Robert (Persistent Memory) > > wrote: > > >=20 > > > For the UEFI memory map, that was indeed my intention.=A0=A0I > > > don't want it silently round to "20 GiB".=A0=A0Even rounding > > > to "19.999 GiB" is imprecise. > >=20 > > OK, let's just go with your original patch Robert (minus the @ addr > > bit) since it's pretty small and does what we want for this specifi= c > > case. >=20 > However I am against this, but seems reviewers do not leave a chance = to > us, I would propose to copy-and-paste table of binary prefixes and us= e > __ffs64(). Is there a benefit to this approach other than __ffs64() being faster? It is a neglibible performance gain anyway because this is hidden behind efi=3Ddebug, and so by definition you're not looking for ultra performance. Which makes picking between __ffs64() and non-__ffs64() a wash if we're not going to be reusing existing code.