lkml.org 
[lkml]   [2016]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread
From
Date
On 03/01/16 13:32, Peter Zijlstra wrote:
> On Tue, Mar 01, 2016 at 08:23:12PM +0000, Mathieu Desnoyers wrote:
>> I think it's important that user-space fast-paths can quickly
>> detect whether the feature is enabled without having to rely on
>> always reading a separate cache-line. I've put together an ABI
>> proposal that take into account the feedback received so far.
>
> Nah, adding detectoring code to fast paths is silly, makes them less
> fast. Doesn't userspace have self modifying code? I know that at least
> glibc does linker trickery to call different functions depending on
> runtime context.
>

No, userspace does not have self-modifying code. The glibc indirect
function is done at dynamic link time; it is also worth noting that
resolving global symbols through dynamic linking often requires an
indirect call.

-hpa


\
 
 \ /
  Last update: 2016-03-01 23:21    [W:0.212 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site