lkml.org 
[lkml]   [2012]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/16] math128: Introduce various 128bit primitives
From
Date
On Wed, 2012-10-24 at 16:18 -0700, Linus Torvalds wrote:
> On Wed, Oct 24, 2012 at 2:53 PM, Juri Lelli <juri.lelli@gmail.com> wrote:
> > From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >
> > Grow rudimentary u128 support without relying on gcc/libgcc.
>
> I missed the part where somebody explains why and what needs this?
> It's going to be very expensive indeed on some platforms, so the fact
> that it is *sometimes* cheap doesn't necessarily imply it should ever
> be used.
>
> So please, explain what the pressing need is that is so worthwhile
> that this is worth it. Maybe it was in a 00/16 cover letter, but not
> only was that not sent out to the people who got 01, you'd still want
> it in the commit message.

There's two use cases:

1) the proposed SCHED_DEADLINE needs to do some u64xu64 math, it
ends up having to multiply a deadline (in usec) with runtime (also
in usec).

2) the infrastructure adds mul_u64_u32_shr(), which is something we
do a lot of with all the time manipulation, apply a multiplier to
some u64 clock value.

We can do better on some archs than we can in generic, so this
interface could give a win there.


But yes, in general people should be very very reluctant to use this.


\
 
 \ /
  Last update: 2012-10-25 16:21    [W:0.208 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site