<!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] [PATCH] mthca updates (2.6.8 dependent)</TITLE>
</HEAD>
<BODY>
<BR>
<BR>

<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Roland Dreier [<A HREF="mailto:roland@topspin.com">mailto:roland@topspin.com</A>] </FONT>
<BR><FONT SIZE=2>> Sent: Monday, August 16, 2004 6:52 PM</FONT>
</P>

<P><FONT SIZE=2>>     Dror> Anyway, I believe that with both MSI and MSI-X you can avoid</FONT>
<BR><FONT SIZE=2>>     Dror> the PIO read. * If it's MSI-X, it's easy. By the IRQ# you</FONT>
<BR><FONT SIZE=2>>     Dror> can tell which EQ has work.  * If it's MSI, just go and peek</FONT>
<BR><FONT SIZE=2>>     Dror> into all available EQs. It's much more efficient than doing</FONT>
<BR><FONT SIZE=2>>     Dror> a PIO read.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> It seems this would apply to standard INTx mode as well.  Do </FONT>
<BR><FONT SIZE=2>> you know why Mellanox didn't use this in THCA?  In any case, </FONT>
<BR><FONT SIZE=2>> I'll have to benchmark this approach.</FONT>
<BR><FONT SIZE=2>> </FONT>
</P>

<P><FONT SIZE=2>In PCI/PCIX, the interrupt is a wire, so it is not guaranteed that by the time you</FONT>
<BR><FONT SIZE=2>got the interrupt, the EQE will be waiting in memory. This is because interrupt</FONT>
<BR><FONT SIZE=2>goes on a separate wire from HCA to interrupt controller, while data goes </FONT>
<BR><FONT SIZE=2>up the PCI bridges. Therefore it is required to perform a PIO read to flush all</FONT>
<BR><FONT SIZE=2>posted writes flying upstream.</FONT>
<BR><FONT SIZE=2>In PCI-Express, the interrupt is a message, so it will work. The interrupt will </FONT>
<BR><FONT SIZE=2>just flush the data to the memory because it maintain ordering with posted</FONT>
<BR><FONT SIZE=2>writes upstream. In the current driver, since it's PCI and PCI-Express we</FONT>
<BR><FONT SIZE=2>don't do it. In the new mode for Arbel we may do it.</FONT>
<BR><FONT SIZE=2>When you do MSI/MSI-X, then architecturally it is guaranteed that by the time</FONT>
<BR><FONT SIZE=2>you get the interrupt, the data already waits for you in memory.</FONT>
</P>

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

</BODY>
</HTML>