Messages in this thread | | | Subject | Re: [patch v1, kernel version 3.2.1] Source mode for macvlan interaface | From | Eric Dumazet <> | Date | Mon, 23 Jan 2012 18:08:45 +0100 |
| |
Le lundi 23 janvier 2012 à 15:44 +0100, Štefan Gula a écrit : > 2012/1/23 Eric Dumazet <eric.dumazet@gmail.com>:
> >> +static void macvlan_hash_del_sources(struct macvlan_source_list *list, > >> + bool sync) > >> +{ > >> + hlist_del_rcu(&list->hlist); > >> + kfree_rcu(list, rcu); > >> + if (sync) > >> + synchronize_rcu(); > >> +} > >> + > > > > Please explain why are you using synchronize_rcu() here, as there must > > be a good reason, but I missed it. > I though so, but I was not sure whether that should be removed or not > so I rather leave it there as I followed the original code structure > of macvlan driver. So should I remove it?
If you use kfree_rcu(), its a call_rcu() : A grace period will be respected before the object freeing, so you dont need the synchronize_rcu() at all.
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |