[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.11.1509122111110.1491@ja.home.ssi.bg>
Date: Sat, 12 Sep 2015 21:28:36 +0300 (EEST)
From: Julian Anastasov <ja@....bg>
To: nick <xerofoify@...il.com>
cc: wensong@...ux-vs.org, horms@...ge.net.au, pablo@...filter.org,
kaber@...sh.net, kadlec@...ckhole.kfki.hu, davem@...emloft.net,
netdev@...r.kernel.org, lvs-devel@...r.kernel.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipvs:Fix locking requirements in the function
ip_vs_unlink_service
Hello,
On Sat, 12 Sep 2015, nick wrote:
> > BH locking is not needed anymore. Also, sched_lock is
> > used by schedulers to protect only access to svc->sched_data
> > fields.
> >
> > It seems the comment is outdated after
> > commit ceec4c381681 ("ipvs: convert services to rcu").
> >
> Julian,
> You are correct after reading the commit id for rcu locking conversion that this comment
> is outdated. However the locking may still be required but in terms of rcu_read_lock/
> unlock around this function call as it's still a critical region.
This function is called under __ip_vs_mutex, so
there is single writer that modifies the configuration.
As "readers" the schedulers access the configuration under
rcu_read_lock (eg. called in tcp_conn_schedule) but they
are free to use other locking too. ip_vs_wlc.c scheduler
is example where sched_lock is not used because only
svc->destinations is accessed which is protected with RCU
by definition. You can check __ip_vs_unlink_dest() how
dest is unlinked with list_del_rcu() before sched->del_dest
method is called.
Regards
--
Julian Anastasov <ja@....bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists