Re: net/sched: latent livelock in dev_deactivate_many() due to yield() usage
From: Cong Wang
Date: Wed Apr 05 2017 - 01:25:45 EST
On Tue, Apr 4, 2017 at 8:20 PM, Mike Galbraith <efault@xxxxxx> wrote:
> - while (some_qdisc_is_busy(dev))
> - yield();
> + swait_event_timeout(swait, !some_qdisc_is_busy(dev), 1);
> }
I don't see why this is an improvement even if I don't care about the
hardcoded timeout for now... Why the scheduler can make a better
decision with swait_event_timeout() than with cond_resched()?