Messages in this thread | | | Date | Mon, 5 Dec 2016 23:02:21 +0100 | From | Pavel Machek <> | Subject | Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. |
| |
Hi!
> > > > Actually, I was wrong. irqlock protection is needed, since > > stmmac_tx_clean() is called from timer, and that's interrupt context, > > as you can confirm using BUG_ON(in_interrupt()); > > > > in_interrupt() can mean both softirq and hardirq context. In this case it > means softirq. So I guess you were right before, and no irq locking is needed.
Are you absolutely sure? Because my testing seems to indicate otherwise (but I may have made a mistake).
According to
https://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/c214.html
we need spin_lock_bh at minimum, as we are locking user context against timer.
Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [unhandled content-type:application/pgp-signature] | |