lkml.org 
[lkml]   [2014]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why do we still have 32 bit counters? Interrupt counters overflow within 50 days
On Sun, 5 Oct 2014, Thomas Gleixner wrote:

>>
>> 64 bit counters on 32 bit machines are not an easy thing and could be
>
> Whats so hard about 64bit counters on 32bit machines?
>
>> expensive to handle in particular because these counters are used in
>> performance critical hotpaths.
>
> The expensive overhead is a single "adcl" instruction.

As I understand it, since the 64 bit math cannot be made atomic, it requires
protecting the counter with a lock so that it can't be read while half updated.
Aquiring a lock on every update is an expensive thing to do. It's not something
people like to see in a fast path, especially for something of as low an
importance as the counters.

David Lang


\
 
 \ /
  Last update: 2014-10-06 13:21    [W:0.087 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site