lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Apr 2022 19:38:55 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     David Laight <David.Laight@...LAB.COM>,
        Michael Straube <straube.linux@...il.com>,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Larry Finger <Larry.Finger@...inger.net>,
        Phillip Potter <phil@...lpotter.co.uk>,
        "open list:STAGING SUBSYSTEM" <linux-staging@...ts.linux.dev>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: staging: r8188eu: how to handle nested mutex under spinlock

Hi David,

On 4/4/22 11:50, David Laight wrote:
>> 
>> > 		while (pwrpriv->bInSuspend &&
>> 
>> I've looked into what gcc11 produced from this function and looks like
>> my compiler is smart enough to not cache that value, but I am afraid not
>> all compilers are that smart.
> 
> The compiler can't cache the value because of the function call.
> 

Hm, I am a newbie in compilers, so can you, please, explain (or give a 
link to any resource where I can read about it) how function call here 
prevent caching.

IIUC compiler generates code that works well in scope of single-threaded 
application, so why can't compiler cache that value instead of accessing 
memory on each iteration... Isn't register access a way faster than even 
cache hit?


Thanks!

With regards,
Pavel Skripkin

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ