On Fri, Oct 20, 2017 at 1:31 PM, Cong Wang <[email protected]> wrote: > Actually, I just tried this approach, this way makes the core tc filter > code harder to wait for flying callbacks, currently rcu_barrier() is > enough, with one more schedule_work() added we probably > need flush_workqueue()... Huh, this also means I can't use the > global workqueue so should add a new workqueue for tc filters. > > Good news is I seem to make it work without adding much code. > Stay tuned. ;)
Hmm, lockdep already complains I have a deadlock when flushing workqueue while hodling RTNL lock, because callbacks need RTNL too... See the rcu_barrier() in tcf_block_put(). So this approach seems to be a dead end. Is there any way out? Probably we have to convert call_rcu() to synchronize_rcu(), but with batching of course.
