[Sheepdog] race window accessing current_vnode_info?

Yunkai Zhang yunkai.me at gmail.com
Thu May 3 14:24:05 CEST 2012


在 2012年5月3日星期四,MORITA Kazutaka 写道:

> 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.

I'm going to fix it.

> >

>
> > 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
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
>


-- 
Yunkai Zhang
Work at Taobao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20120503/f8ecb0e2/attachment.html>


More information about the sheepdog mailing list