<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    David and All,<br>
    <br>
    Changed as suggested by David. <br>
    <br>
    David, I did not move the warning into  set_parallel_gc_flags()
    since except for serial gc, all other GCs will check this flag, so I
    moved it into <br>
    <font color="black">#if INCLUDE_ALL_GCS </font><br>
    <br>
    before call set GC flags.<br>
    <br>
    new webrev: <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~minqi/2178143/">http://cr.openjdk.java.net/~minqi/2178143/</a><br>
    <br>
    Thanks<br>
    Yumin<br>
    <br>
    <br>
     <br>
    <div class="moz-cite-prefix">On 3/25/2013 5:44 PM, David Holmes
      wrote:<br>
    </div>
    <blockquote cite="mid:5150EF71.8040507@oracle.com" type="cite">Hi
      Yumin,
      <br>
      <br>
      I have a few suggested changes.
      <br>
      <br>
      First in os.hpp I suggest
      <br>
      <br>
       return _processor_count > 1 || AssumeMP ;
      <br>
      <br>
      That way we don't bypass the assertion and don't encounter
      unnecessary overhead on the common path.
      <br>
      <br>
      In arguments.cpp:
      <br>
      <br>
      +   if (AssumeMP && FLAG_IS_DEFAULT(ParallelGCThreads)) {
      <br>
      +     warning("With AssumeMP, recommend run with
      -XX:ParallelGCThreads=<num_of_gc_threads>, where"
      <br>
      +             "  num_of_gc_threads can be set to number of
      cores");
      <br>
      +   }
      <br>
      <br>
      I'm not convinced issuing a warning is necessary or desirable
      here. With a uniprocessor startup will we even default to using
      parallel GC? The above should only be issued if using parallel GC
      - so better to move it into set_parallel_gc_flags().
      <br>
      <br>
      In any case it isn't clear what the user should supply here. If
      they use the maximum expected number of cores initially then while
      they only have 1 core their VM may not even function adequately
      due to GC overhead. I think all you can say here is something
      like:
      <br>
      <br>
      warning("If the number of processors is expected to increase from
      one, then you should configure the number of parallel GC threads
      appropriately using -XX:ParallelGCThreads=N");
      <br>
      <br>
      <br>
      In globals.hpp:
      <br>
      <br>
      +   product(bool, AssumeMP, false,       \
      <br>
      +           "Assume run on multiple processors always")       \
      <br>
      <br>
      Was there any discussion on making this default to true instead?
      <br>
      <br>
      Suggested re-wording:
      <br>
      <br>
       "Instruct the VM to assume multiple processors are available"
      <br>
      <br>
      Thanks,
      <br>
      David
      <br>
      <br>
      On 26/03/2013 9:15 AM, Yumin Qi wrote:
      <br>
      <blockquote type="cite">It should be "AssumeMP".
        <br>
        <br>
        /Yumin
        <br>
        <br>
        On 3/25/2013 3:32 PM, Yumin Qi wrote:
        <br>
        <blockquote type="cite">Hi,
          <br>
          <br>
            New webrev to use "-XX:+AssumMP" flag. Also add warning to
          recommend
          <br>
          use this flag with "-XX:ParallelGCThreads" to remind user to
          avoid
          <br>
          running with only one GC thread. This is verified by Oleksandr
          with
          <br>
          the test case running on Linux which is not Zone configured.
          <br>
          <br>
            Same link.
          <br>
          <br>
          Thanks
          <br>
          Yumin
          <br>
          <br>
          On 3/20/2013 2:27 PM, Yumin Qi wrote:
          <br>
          <blockquote type="cite">
            <br>
            2178143:  VM crashes if the number of bound CPUs changed
            during runtime.
            <br>
            <br>
            Situation: Customer first configure only one CPU online and
            turn
            <br>
            others offline to run java application, after java program
            started,
            <br>
            bring more CPUs back online. Since VM started on a single
            CPU,
            <br>
            os::is_MP() will return false, but after more CPUs
            available, OS will
            <br>
            schedule the app run on multiple CPUs, this caused SEGV in
            various
            <br>
            places where data consistency was broken. The solution is
            supply a
            <br>
            flag to assume it is running on MP, so lock is forced to be
            called.
            <br>
            <br>
            <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~minqi/2178143/">http://cr.openjdk.java.net/~minqi/2178143/</a>
            <br>
            <br>
            Thanks
            <br>
            Yumin
            <br>
          </blockquote>
          <br>
        </blockquote>
        <br>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>