lkml.org 
[lkml]   [2022]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 6/6] eventpoll: add support for min-wait
From
>>> @@ -1845,6 +1891,18 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
>>> ewq.timed_out = true;
>>> }
>>>
>>> + /*
>>> + * If min_wait is set for this epoll instance, note the min_wait
>>> + * time. Ensure the lowest bit is set in ewq.min_wait_ts, that's
>>> + * the state bit for whether or not min_wait is enabled.
>>> + */
>>> + if (ep->min_wait_ts) {
>>
>> Can we limit this block to "ewq.timed_out && ep->min_wait_ts"?
>> AFAICT, the code we run here is completely wasted if timeout is 0.
>
> Yep certainly, I can gate it on both of those conditions.
Looking at this for a respin, I think it should be gated on
!ewq.timed_out? timed_out == true is the path that it's wasted on
anyway.

--
Jens Axboe

\
 
 \ /
  Last update: 2022-12-01 19:02    [W:0.138 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site