[Sheepdog] race window accessing current_vnode_info?

Liu Yuan namei.unix at gmail.com
Thu May 3 12:34:54 CEST 2012


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

Thanks,
Yuan



More information about the sheepdog mailing list