[Sheepdog] race window accessing current_vnode_info?

MORITA Kazutaka morita.kazutaka at gmail.com
Thu May 3 13:56:51 CEST 2012


At Thu, 03 May 2012 18:34:54 +0800,
Liu Yuan wrote:
> 
> On 05/03/2012 06:22 PM, MORITA Kazutaka wrote:
> 
> > The old code also has the completely same problem; worker threads call
> > get_ordered_sd_vnode_list()/free_ordered_sd_vnode_list().  The correct
> > approach is to modify the code so that all
> > get_vnode_info()/put_vnode_info() are called only in the main thread.
> > I'll do the work if no one is trying to fix it now.
> 
> 
> how about introducing lockless mechanism such as Read Copy Update (RCU)?
> It seems that we can make use of shared variables between main and
> worker threads without locks and also get the benefit to avoid a rework?
> get/put_vnode_info() might be a good starting point to use it.
>
> There is also a user level implementation URCU (http://lttng.org/urcu).

I'm not against introducing it if the library is mature, but I'm
afraid that it would make it harder to ensure the correctness of the
program.  If possible, I don't want to access shared variables from
other than the main thread.

Thanks,

Kazutaka



More information about the sheepdog mailing list