<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Ivan, <br>
</p>
<p>apologies for late review. I like the approach taken. It should
help minimize contention. I'd have to highlight though that most
contention seen in this area will be probably down to lack of raw
CPU power. As RSA key lengths continue to grow, more CPU
calculations will become necessary. The new intrinsics work
recently completed will also benefit this area. [1] <br>
</p>
<p>I was a bit confused around why you're calling modPow earlier in
iterBlindingRandomPair now but got it in the end. It won't be a
wasted cycle in any case as per your notes. Looks good to me. It
would be good for you to get a member of Security team to review
this.<br>
</p>
<p>[1] <a class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8153189">https://bugs.openjdk.java.net/browse/JDK-8153189</a><br>
</p>
<pre class="moz-signature" cols="72">Regards,
Sean.</pre>
<div class="moz-cite-prefix">On 23/05/2016 12:41, Ivan Gerasimov
wrote:<br>
</div>
<blockquote
cite="mid:7c02d7f6-6492-018f-d087-51dfc7fd6023@oracle.com"
type="cite">Hello!
<br>
<br>
It has been observed that under some circumstances a scalability
bottleneck may be observed, when accessing the internal
BlindingParameters structure in the sun.security.rsa.RSACore
class.
<br>
<br>
It is proposed to slightly reorganize the code around, to reduce
the possible contention.
<br>
<br>
Would you please help review the proposal?
<br>
<br>
BUGURL: <a class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8080273">https://bugs.openjdk.java.net/browse/JDK-8080273</a>
<br>
WEBREV: <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~igerasim/8080273/00/webrev/">http://cr.openjdk.java.net/~igerasim/8080273/00/webrev/</a>
<br>
<br>
Three things are done here:
<br>
1) The instance of BlindingParameters is confined to the current
thread, so no synchronization is necessary when creating the next
BlindingRandomPair;
<br>
2) Extra instances of BlindingParameters, which are created due to
concurency, aren't thrown away but reused;
<br>
3) Only perform { u = u.modPow(BIG_TWO, n); v = v.modPow(BIG_TWO,
n); } when needed, thus save the last unused calculation.
<br>
<br>
Comments, suggestions are very welcome!
<br>
<br>
With kind regards,
<br>
Ivan
<br>
</blockquote>
<br>
</body>
</html>