<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23501"><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Wingdings;
}
@font-face {
font-family: Cambria Math;
}
@font-face {
font-family: Calibri;
}
@font-face {
font-family: Tahoma;
}
@page WordSection1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P.MsoAcetate {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt; mso-style-priority: 99; mso-style-link: "Balloon Text Char"
}
LI.MsoAcetate {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt; mso-style-priority: 99; mso-style-link: "Balloon Text Char"
}
DIV.MsoAcetate {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt; mso-style-priority: 99; mso-style-link: "Balloon Text Char"
}
P.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt; mso-style-priority: 34
}
LI.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt; mso-style-priority: 34
}
DIV.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt; mso-style-priority: 34
}
SPAN.BalloonTextChar {
FONT-FAMILY: "Tahoma","sans-serif"; mso-style-priority: 99; mso-style-link: "Balloon Text"; mso-style-name: "Balloon Text Char"
}
P.emailquote {
FONT-FAMILY: "Times New Roman","serif"; MARGIN-LEFT: 1pt; FONT-SIZE: 12pt; MARGIN-RIGHT: 0in; mso-style-name: emailquote; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
LI.emailquote {
FONT-FAMILY: "Times New Roman","serif"; MARGIN-LEFT: 1pt; FONT-SIZE: 12pt; MARGIN-RIGHT: 0in; mso-style-name: emailquote; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
DIV.emailquote {
FONT-FAMILY: "Times New Roman","serif"; MARGIN-LEFT: 1pt; FONT-SIZE: 12pt; MARGIN-RIGHT: 0in; mso-style-name: emailquote; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle21 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle22 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle23 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle24 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle25 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle26 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle27 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
.MsoChpDefault {
FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.WordSection1 {
page: WordSection1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US link=blue vLink=purple>
<DIV dir=ltr align=left><SPAN class=159003100-19072013><FONT color=#0000ff
size=2 face=Arial>Hi all,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=159003100-19072013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=159003100-19072013><FONT color=#0000ff
size=2 face=Arial>Sounds like we all agree to remove the compiling flag. I will
prepare a patch and send it out for your review after running thru the required
tests.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=159003100-19072013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=159003100-19072013><FONT color=#0000ff
size=2 face=Arial>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=159003100-19072013><FONT color=#0000ff
size=2 face=Arial>Alex</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Knoblaugh, Rick
[mailto:Rick.Knoblaugh@lsi.com] <BR><B>Sent:</B> Thursday, July 18, 2013 5:16
PM<BR><B>To:</B> Luse, Paul E; Freyensee, James P; Murray, Kris R; Po-Yen Chang;
Judy Brock-SSI; nvmewin@lists.openfabrics.org<BR><B>Subject:</B> RE: [nvmewin]
COMPLETE_IN_DPC flag & relationship to NvmeStartiopath critical section
handling not protected from NVMe ISR?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=WordSection1>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Hi
Paul,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">
Thanks for explaining history behind that one. I do recall that now. Yes, I
would agree, may as well go ahead and remove and stick with DPC
approach.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">
Thanks,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">
-Rick<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">
nvmewin-bounces@lists.openfabrics.org
[mailto:nvmewin-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Luse, Paul
E<BR><B>Sent:</B> Thursday, July 18, 2013 4:56 PM<BR><B>To:</B> Freyensee, James
P; Murray, Kris R; Po-Yen Chang; Judy Brock-SSI;
nvmewin@lists.openfabrics.org<BR><B>Subject:</B> Re: [nvmewin] COMPLETE_IN_DPC
flag & relationship to NvmeStartio path critical section handling not
protected from NVMe ISR?<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">So
it was originally in there during early dev to measure system performance impact
of completing in the ISR or pushing off to a DPC; general old school rule of
thumb is to minimize ISR work and finish everything else in a DPC to be
friendlier to the system. With NVMe completion being so lightweight we
figured we could get away without the DPC and it used to work both ways under
heavy stress. As both methods are not always tested (after all it’s a
compile switch) clearly its easy to break one of them. I actually ran the
tests DPC vs ISR back then and there was no significant impact either way.
I was using xperf and I’m sure I shared the results with the other members of
the original team as well – doubt I have them anymore but I’ll look.
Either way, at this point in time its probably is a good simplification to pick
one method and remove the compile switch for the other. I’d probably stick
with the DPC route as (a) there was no major benefit from finishing in ISR and
(b) sounds like its busted now anyway </SPAN><SPAN
style="FONT-FAMILY: Wingdings; COLOR: #1f497d; FONT-SIZE: 11pt">J</SPAN><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> <A
href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</A>
[<A
href="mailto:nvmewin-bounces@lists.openfabrics.org">mailto:nvmewin-bounces@lists.openfabrics.org</A>]
<B>On Behalf Of </B>Freyensee, James P<BR><B>Sent:</B> Thursday, July 18, 2013
4:43 PM<BR><B>To:</B> Murray, Kris R; Po-Yen Chang; Judy Brock-SSI; <A
href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</A><BR><B>Subject:</B>
Re: [nvmewin] COMPLETE_IN_DPC flag & relationship to NvmeStartio path
critical section handling not protected from NVMe
ISR?<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Out
of curiosity, what was the original reason to have the ISR path in the first
place? If it is currently in the driver code, there must had been
some purpose to be able to either compile it using an ISR or a
DPC.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> <A
href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</A>
[<A
href="mailto:nvmewin-bounces@lists.openfabrics.org">mailto:nvmewin-bounces@lists.openfabrics.org</A>]
<B>On Behalf Of </B>Murray, Kris R<BR><B>Sent:</B> Thursday, July 18, 2013 4:29
PM<BR><B>To:</B> Po-Yen Chang; Judy Brock-SSI; <A
href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</A><BR><B>Subject:</B>
Re: [nvmewin] COMPLETE_IN_DPC flag & relationship to NvmeStartio path
critical section handling not protected from NVMe
ISR?<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Judy,</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">I
have no problems removing it.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">~Kris</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> <A
href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</A>
[<A
href="mailto:nvmewin-bounces@lists.openfabrics.org">mailto:nvmewin-bounces@lists.openfabrics.org</A>]
<B>On Behalf Of </B>Po-Yen Chang<BR><B>Sent:</B> Thursday, July 18, 2013 4:27
PM<BR><B>To:</B> Judy Brock-SSI; <A
href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</A><BR><B>Subject:</B>
Re: [nvmewin] COMPLETE_IN_DPC flag & relationship to NvmeStartio path
critical section handling not protected from NVMe
ISR?</SPAN><o:p></o:p></P></DIV></DIV>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">Judy,</SPAN><o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">I feel
the same way as well. Let's wait for the response from LSI and Intel on this. If
they all agree, I will go ahead remove it.</SPAN><o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">Thanks,</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">Alex</SPAN><o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<DIV style="TEXT-ALIGN: center" class=MsoNormal align=center>
<HR align=center SIZE=3 width="100%">
</DIV>
<P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> <A
href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</A>
[<A
href="mailto:nvmewin-bounces@lists.openfabrics.org">mailto:nvmewin-bounces@lists.openfabrics.org</A>]
<B>On Behalf Of </B>Judy Brock-SSI<BR><B>Sent:</B> Thursday, July 18, 2013 4:17
PM<BR><B>To:</B> Judy Brock-SSI; <A
href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</A><BR><B>Subject:</B>
[nvmewin] COMPLETE_IN_DPC flag & relationship to NvmeStartio path critical
section handling not protected from NVMe ISR?</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">So
it looks like the reason this problem was not seen before is because it
only surfaces when the COMPLETE_IN_DPC compile flag is <B>not</B> set. In other
words, the COMPLETE_IN_ISR path is broken because it accesses our
HwDeviceExtension without being synchronized with other paths in the driver
which do the same.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">We
can either fix the path which does completions in the ISR or get rid of that
option entirely. Since it’s generally considered bad practice to do that kind of
work in an ISR because it’s supposed to be as lean and mean as possible, would
the team be adverse to getting rid of the logic which optionally allows
completions to be handled by the ISR?</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">If
we insist on retaining it, a) we should come up with a good reason why and
b) we should fix it asap because it is definitely not safe to use in its present
form.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Personally
I vote for removal - we wouldn’t need the COMPLETE_IN_DPC flag either
anymore if we go that route.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Thanks,</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Judy</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Judy Brock-SSI
<BR><B>Sent:</B> Thursday, July 18, 2013 6:22 AM<BR><B>To:</B> Judy Brock-SSI;
'nvmewin@lists.openfabrics.org'<BR><B>Subject:</B> RE: NvmeStartio path critical
section handling not protected from NVMe ISR?</SPAN><o:p></o:p></P></DIV></DIV>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">I
just thought of another way to handle this problem.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Could
we not call <B>StorPortSynchronizeAccess() </B>with a pointer back to our
ProcessIo() routine?<B> </B>ProcessIo would get called before the call to
StorPortSynchronizeAccess() returns and this would have the effect of
guaranteeing synchronization with our ISR.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">This
seems like a much cleaner solution that a lock-acquiring approach.
</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">I
still don’t know if there are any issues with ProcessIo being called multiple
times, from non-StartIo code paths, etc. – would still need to be looked
at.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Thanks,</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Judy</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Judy Brock-SSI
<BR><B>Sent:</B> Wednesday, July 17, 2013 10:08 PM<BR><B>To:</B> <A
href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</A><BR><B>Subject:</B>
NvmeStartio path critical section handling not protected from NVMe
ISR?</SPAN><o:p></o:p></P></DIV></DIV>
<P class=MsoNormal> <o:p></o:p></P>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">All,
</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">Under
Windows Server 2012, I’ve seen a crash where NVMeStartIo() gets
interrupted by our ISR at a time when it’s in the middle of manipulating a
linked list critical data structure which the ISR then goes on to attempt to
manipulate also - which results in a crash. Below is the call stack – see
where I’ve inserted the comment</SPAN><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> “</SPAN><B><SPAN
style="FONT-FAMILY: Wingdings; COLOR: red; FONT-SIZE: 9pt">ß</SPAN></B><B><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: red; FONT-SIZE: 9pt">-STARTIO
PATH GETS CLOBBERED BY OUR INTERRUPT HANDLER BECAUSE WE AREN’T HOLDING THE
INTERRUPT SPIN LOCK”</SPAN></B><o:p></o:p></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: red; FONT-SIZE: 9pt"> </SPAN></B><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">2:
kd> kc</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">Call
Site</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!RtlpBreakWithStatusInstruction</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiBugCheckDebugBreak</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KeBugCheck2</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KeBugCheckEx</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiBugCheckDispatch</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiFastFailDispatch</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiRaiseSecurityCheckFailure</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!RtlFailFast</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!FatalListEntryError</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!RtlpCheckListEntry</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!InsertTailList</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!NVMeCompleteCmd</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!NVMeIsrMsix</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiInterruptDispatch
</SPAN><B><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: red; FONT-SIZE: 9pt"> </SPAN></B><B><SPAN
style="FONT-FAMILY: Wingdings; COLOR: red; FONT-SIZE: 9pt">ß</SPAN></B><B><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: red; FONT-SIZE: 9pt">-STARTIO
PATH GETS CLOBBERED BY OUR INTERRUPT HANDLER BECAUSE WE AREN’T HOLDING THE
INTERRUPT SPIN LOCK</SPAN></B><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!RemoveHeadList</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!NVMeGetCmdEntry</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!ProcessIo</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nvme!NVMeStartIo</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">storport!RaidpAdapterContinueScatterGather</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">hal!HalpAllocateAdapterCallbackV2</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">hal!IoFreeAdapterChannelV2</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">hal!HalAllocateAdapterChannelV2</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">hal!HalBuildScatterGatherListV2</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">storport!RaUnitStartIo</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">storport!RaidUnitCompleteRequest</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">storport!RaidpAdapterRedirectDpcRoutine</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiExecuteAllDpcs</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 9pt">nt!KiRetireDpcList</SPAN><o:p></o:p></P>
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: red; FONT-SIZE: 9pt"> </SPAN></B><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">I
looked through the code and noticed we never call StorPortAcquireSpinLock to
acquire the InterruptLock to protect us from such pre-emption. Another way to
achieve this would be to indicate we run at half-duplex rather than
full-duplex but that would degrade the general performance of the driver.
</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">I’m
not sure why we didn’t run into this way before now – is there some other
re-entrance protection algorithm besides the two above that others are aware of?
If not, I believe we need to fix this asap.
Suggestions:</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P style="TEXT-INDENT: -0.25in" class=MsoListParagraph><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">A.</SPAN><SPAN
style="COLOR: black; FONT-SIZE: 7pt"> </SPAN><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">Simplest
approach is to lock down all of NVMeStartIo as per below (not tested yet) but we
almost may as well run half-duplex if we do this:</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 9pt">1 . At
the very the top of NVMeStartIo:</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 9pt">/* we should
never be holding the interrupt lock upon entry to
NVMeStartIo.</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 9pt">
* Acquire the Interrupt Spin Lock to protect against getting hit by our ISR.
</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 9pt">
*/</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
<SPAN style="COLOR: blue">if</SPAN> (NULL ==
pAdapterExtension->hInterruptLock) {</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
(StorPortAcquireSpinLock(pAdapterExtension,</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
InterruptLock,</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
NULL,</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
&pAdapterExtension->hInterruptLock);</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
}</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
<SPAN style="COLOR: blue">else</SPAN> {</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
ASSERT(FALSE);</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
}</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">2. </SPAN><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 9pt">At the
very the top of </SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">IO_StorPortNotification</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
PNVME_DEVICE_EXTENSION pAE = (PNVME_DEVICE_EXTENSION)
pHwDeviceExtension;</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> <SPAN
style="COLOR: green">/* if we got here from NvmeStartIo we need to release the
interrupt lock */</SPAN></SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
<SPAN style="COLOR: blue">if</SPAN> (NULL != pAE->hInterruptLock)
{</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
STOR_LOCK_HANDLE hInterruptLockCopy =
pAE->hInterruptLock;</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
pAE->hInterruptLock = NULL;</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
StorPortReleaseSpinLock(pAE, &hInterruptLockCopy);</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
}</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">3. At the very bottom of
NVMeStartIo:</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
<SPAN style="COLOR: green">/* if we didn't release the Interrupt Lock in one of
the calls to </SPAN></SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 9pt">
* IO_StorPortNotification above we need to release before we exit
NVMEStartIo</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 9pt">
*/</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
<SPAN style="COLOR: blue">if</SPAN> (NULL != pAE->hInterruptLock)
{</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
STOR_LOCK_HANDLE hInterruptLockCopy =
pAE->hInterruptLock;</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
pAE->hInterruptLock = NULL;</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
StorPortReleaseSpinLock(pAE,
&hInterruptLockCopy);</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">
}</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> </SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"> <SPAN
style="COLOR: blue">return</SPAN> TRUE;</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt">} <SPAN
style="COLOR: green">/* NVMeStartIo */</SPAN></SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"> </SPAN><o:p></o:p></P>
<P style="TEXT-INDENT: -0.25in" class=MsoListParagraph><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">B.</SPAN><SPAN
style="COLOR: black; FONT-SIZE: 7pt"> </SPAN><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">Better
approach is to just lock ProcessIo(). But code exists in that routine
which acquires the StartIo lock – we can’t take locks out of order or we’ll
cause deadlock. Right now that code never gets invoked – what was it for?
Do we still need it? Can ProcessIo() get called from non-StartIo Paths? Can it
get called multiple times? Not having been involved in the initial development
of this driver, I would need to study the flow to make sure to respect the
StorPort lock acquiring/releasing hierarchy rules at all times. If those
conversant in the overall developmental history and architecture of this driver
could share their thoughts, that would be great.</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">Thanks,</SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 11pt">Judy</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 0.5in" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN><o:p></o:p></P></DIV></DIV></BODY></HTML>