On Wed, 24 Feb 2021 16:16:58 -0800 Wei Wang wrote:
> On Wed, Feb 24, 2021 at 4:11 PM Alexander Duyck <alexanderdu...@fb.com> wrote:
> >
> > The problem with adding a bit for SCHED_THREADED is that you would
> > have to heavily modify napi_schedule_prep so that it would add the
> > bit. That is the reason for going with adding the bit to the busy
> > poll logic because it added no additional overhead. Adding another
> > atomic bit setting operation or heavily modifying the existing one
> > would add considerable overhead as it is either adding a
> > complicated conditional check to all NAPI calls, or adding an
> > atomic operation to the path for the threaded NAPI.  
> 
> Please help hold on to the patch for now. I think Martin is still
> seeing issues on his setup even with this patch applied. I have not
> yet figured out why. But I think we should not merge this patch until
> the issue is cleared. Will update this thread with progress.

If I'm looking right __busy_poll_stop() is only called if the last
napi poll used to re-enable IRQs consumed full budget. You need to
clear your new bit in busy_poll_stop(), not in __busy_poll_stop().
That will fix the case when hand off back to the normal poller (sirq, 
or thread) happens without going thru __napi_schedule().

Reply via email to