lkml.org 
[lkml]   [2020]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] sched: better handling for busy polling loops
Date
On 23/10/20 09:19, Peter Zijlstra wrote:
>> + /*
>> + * preemption needs to be kept disabled between prepare_to_busy_poll()
>> + * and end_busy_poll().
>> + */
>> + BUG_ON(preemptible());
>> + if (allow_resched)
>> + preempt_enable();
>> + else
>> + preempt_enable_no_resched();
> NAK on @allow_resched
>

Since KVM is the one passing false, indeed I see no reason for the
argument; you can just use preempt_enable(). There is no impact for
example on the tracking of how much time was spent polling; that
ktime_get() for the end of the polling period is done before calling
end_busy_poll().

Paolo

\
 
 \ /
  Last update: 2020-10-23 11:34    [W:1.043 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site