[ovs-dev] [seq 2/5] ovs-thread: Add support for globally visible per-thread data.
Kais Belgaied
kbelgaied at nicira.com
Thu Aug 8 18:19:28 UTC 2013
sounds good.
Kais
On Wed, Aug 7, 2013 at 11:25 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Aug 07, 2013 at 05:02:42PM -0700, Kais Belgaied wrote:
> > proposed changes look good.
> > comment needed regarding the reason for internally managed per-thread
> data
> > (limitation of Posix' PTHREAD_KEYS_MAX)
>
> Hmm, I thought that was more about patch 3. I updated that patch's
> commit message to:
>
> ovs-thread: New function ovsthread_id_self().
>
> I foresee a need for possibly large numbers of instances of "struct
> seq" (which is introduced in an upcoming patch). Each struct seq
> needs some per-thread data. POSIX has pthread_key_t for this, but
> the number of keys can be fairly limited, to as few as 128. It is
> reasonable to work around this by using a hash table indexed on the
> current thread. That only works if one can get a thread identifier
> that is hashable (pthread_t is not). This patch introduces a
> hashable thread identifier.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130808/c0208357/attachment-0003.html>
More information about the dev
mailing list