Messages in this thread | | | Date | Mon, 4 Mar 2013 04:55:27 +0100 | From | Andi Kleen <> | Subject | Re: [RFC PATCH 1/5] net: implement support for low latency socket polling |
| |
On Sun, Mar 03, 2013 at 01:20:01PM -0800, Eric Dumazet wrote: > On Sun, 2013-03-03 at 20:21 +0100, Andi Kleen wrote: > > > Alternative to 2) would be to use a generation id, incremented every > > > time a napi used in spin polling enabled driver is dismantled (and freed > > > after RCU grace period) > > > > > > And store in sockets not only the pointer to napi_struct, but the > > > current generation id : If the generation id doesnt match, disable > > > the spinpoll until next packet rebuilds the cache again. > > > > This would require rcu_read_lock, aka preempt off, during polling, right? > > > > Of course, polling probably needs BH disabling as well to get the per > napi lock
Ok maybe the cond_resched() is good enough.
-Andi
-- ak@linux.intel.com -- Speaking for myself only.
| |