<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [openib-general] uverbs: pthread_mutex -> pthread_spinlock ?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>In VAPI we used spinlocks from this reason on all data-path verbs and it gave us better performance.</FONT>
</P>

<P><FONT SIZE=2>Tziporet</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Michael S. Tsirkin [<A HREF="mailto:mst@mellanox.co.il">mailto:mst@mellanox.co.il</A>]</FONT>
<BR><FONT SIZE=2>Sent: Thursday, March 10, 2005 12:47 PM</FONT>
<BR><FONT SIZE=2>To: openib-general@openib.org</FONT>
<BR><FONT SIZE=2>Subject: [openib-general] uverbs: pthread_mutex -> pthread_spinlock ?</FONT>
</P>
<BR>

<P><FONT SIZE=2>I am able to shave about 200ns off the rdma post latency,</FONT>
<BR><FONT SIZE=2>by using pthread_spinlock instead of pthread_mutex for protecting</FONT>
<BR><FONT SIZE=2>the qp post op in libmthca.</FONT>
</P>

<P><FONT SIZE=2>I'm aware of course that a context switch when spinlock is held may</FONT>
<BR><FONT SIZE=2>waste a whole timeslice , but maybe for short operations such as this</FONT>
<BR><FONT SIZE=2>it's reasonable to use spinlocks?</FONT>
</P>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>MST - Michael S. Tsirkin</FONT>
<BR><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>openib-general mailing list</FONT>
<BR><FONT SIZE=2>openib-general@openib.org</FONT>
<BR><FONT SIZE=2><A HREF="http://openib.org/mailman/listinfo/openib-general" TARGET="_blank">http://openib.org/mailman/listinfo/openib-general</A></FONT>
</P>

<P><FONT SIZE=2>To unsubscribe, please visit <A HREF="http://openib.org/mailman/listinfo/openib-general" TARGET="_blank">http://openib.org/mailman/listinfo/openib-general</A></FONT>
</P>

</BODY>
</HTML>