lkml.org 
[lkml]   [2021]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] xen/balloon: use a kernel thread instead a workqueue
From
Date

On 9/8/21 11:11 AM, Juergen Gross wrote:
> On 08.09.21 16:47, Boris Ostrovsky wrote:
>>
>>
>> Given that wait_event_interruptible_timeout() is a bunch of nested macros do we need to worry here about overly aggressive compiler optimizing out 'credit = current_credit()'?
>
> I don't think so. current_credit() is reading from balloon_stats, which
> is a global variable. So the compiler shouldn't assume the contents
> won't change.


Ah, ok --- good point. Then I guess we should be fine.


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>


>
> But I can add a barrier() after 'credit = current_credit()' in case
> you'd feel uneasy without it.
>
>
> Juergen

\
 
 \ /
  Last update: 2021-09-08 18:06    [W:0.045 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site