lkml.org 
[lkml]   [2021]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [x86] d55564cfc2: will-it-scale.per_thread_ops -5.8% regression
On Thu, Jan 07, 2021 at 10:47:07AM -0800, Linus Torvalds wrote:

> Now, the "whole entry" is just 8 bytes, so it's possible that it would
> actually be faster to do a copy of the whole thing rather than write
> just the 16 bits. But I got very nervous about it, because I could
> easily see some threaded app actually changing the 'fd' (or the
> 'event' field) in place (ie writing -1 to it as they close and re-use
> it)

BTW, changing 'event' field in place from another thread is going to
be interesting - you have two 16bit values next to each other and
two CPUs modifying those with no exclusion. Sounds like a recipe
for massive trouble...

Or am I missing something here?

\
 
 \ /
  Last update: 2021-01-07 20:06    [W:0.108 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site