[sheepdog] [PATCH 1/6] sheep: redesign a new cached sockfd pool
Liu Yuan
namei.unix at gmail.com
Mon Jun 25 13:22:53 CEST 2012
On 06/25/2012 07:15 PM, Christoph Hellwig wrote:
> I've not been fully through this series, but two comments:
>
> - we absolutely need the split out struct node_id as a preparatory
> patch before adding the new sockfd cache. Letting the casting mess
> get in first and clean up later will be way more work.
> This will also have various advantages like cleaning up the existing
> qsort/bsearch callbacks.
Point taken. I'll send the patch that add the struct node_id first.
> - I've previously been non-exited about more liburcu use, but for
> a cache like this which gets hit by all threads I don't think
> using the slow sleeping pthread locks is a good idea. We need
> a lockless reader algorithm for this cache as soon as possible.
I have been thinking of it too, but I plan to add RCU in later after
basic idea of sockfd cache is evaluated and merged. Current
pthread-based implementation speed up the prototyping and easy to prove
correctness.
Thanks,
Yuan
More information about the sheepdog
mailing list