Re: [PATCH 1/3] sched: better handling for busy polling loops

2020-10-28 Thread Josh Don
On Fri, Oct 23, 2020 at 10:49 AM Jakub Kicinski wrote: > > On Thu, 22 Oct 2020 20:29:42 -0700 Josh Don wrote: > > Busy polling loops in the kernel such as network socket poll and kvm > > halt polling have performance problems related to process scheduler load > > accounting. > > > > Both of the bu

Re: [PATCH 1/3] sched: better handling for busy polling loops

2020-10-27 Thread Josh Don
On Fri, Oct 23, 2020 at 12:19 AM Peter Zijlstra wrote: > > On Thu, Oct 22, 2020 at 08:29:42PM -0700, Josh Don wrote: > > Busy polling loops in the kernel such as network socket poll and kvm > > halt polling have performance problems related to process scheduler load > > accounting. > > AFAICT you'

Re: [PATCH 1/3] sched: better handling for busy polling loops

2020-10-23 Thread Jakub Kicinski
On Thu, 22 Oct 2020 20:29:42 -0700 Josh Don wrote: > Busy polling loops in the kernel such as network socket poll and kvm > halt polling have performance problems related to process scheduler load > accounting. > > Both of the busy polling examples are opportunistic - they relinquish > the cpu if

Re: [PATCH 1/3] sched: better handling for busy polling loops

2020-10-23 Thread Paolo Bonzini
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 >> +pre

Re: [PATCH 1/3] sched: better handling for busy polling loops

2020-10-23 Thread Vincent Guittot
On Fri, 23 Oct 2020 at 05:30, Josh Don wrote: > > Busy polling loops in the kernel such as network socket poll and kvm > halt polling have performance problems related to process scheduler load > accounting. > > Both of the busy polling examples are opportunistic - they relinquish > the cpu if ano

Re: [PATCH 1/3] sched: better handling for busy polling loops

2020-10-23 Thread Peter Zijlstra
On Thu, Oct 22, 2020 at 08:29:42PM -0700, Josh Don wrote: > Busy polling loops in the kernel such as network socket poll and kvm > halt polling have performance problems related to process scheduler load > accounting. AFAICT you're not actually fixing the load accounting issue at all. > This chan

[PATCH 1/3] sched: better handling for busy polling loops

2020-10-22 Thread Josh Don
Busy polling loops in the kernel such as network socket poll and kvm halt polling have performance problems related to process scheduler load accounting. Both of the busy polling examples are opportunistic - they relinquish the cpu if another thread is ready to run. This design, however, doesn't e