~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to erts/doc/src/erl.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
605
605
          SMP support enabled (see the <seealso marker="#smp">-smp</seealso>
606
606
          flag).</p>
607
607
      </item>
 
608
      <tag><c><![CDATA[+sFlag Value]]></c></tag>
 
609
      <item>
 
610
        <p>Scheduling specific flags.</p>
 
611
        <taglist>
 
612
          <tag>+sbt BindType</tag>
 
613
          <item>
 
614
            <marker id="+sbt"></marker>
 
615
            <p>Set scheduler bind type. Currently valid <c>BindType</c>s:
 
616
            </p>
 
617
            <taglist>
 
618
              <tag><c>u</c></tag>
 
619
              <item><p>Same as
 
620
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, unbound)</seealso>.
 
621
              </p></item>
 
622
              <tag><c>ns</c></tag>
 
623
              <item><p>Same as
 
624
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, no_spread)</seealso>.
 
625
              </p></item>
 
626
              <tag><c>ts</c></tag>
 
627
              <item><p>Same as
 
628
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, thread_spread)</seealso>.
 
629
              </p></item>
 
630
              <tag><c>ps</c></tag>
 
631
              <item><p>Same as
 
632
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, processor_spread)</seealso>.
 
633
              </p></item>
 
634
              <tag><c>nnts</c></tag>
 
635
              <item><p>Same as
 
636
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, no_node_thread_spread)</seealso>.
 
637
              </p></item>
 
638
              <tag><c>nnps</c></tag>
 
639
              <item><p>Same as
 
640
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, no_node_processor_spread)</seealso>.
 
641
              </p></item>
 
642
              <tag><c>tnnps</c></tag>
 
643
              <item><p>Same as
 
644
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, thread_no_node_processor_spread)</seealso>.
 
645
              </p></item>
 
646
              <tag><c>db</c></tag>
 
647
              <item><p>Same as
 
648
              <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, default_bind)</seealso>.
 
649
              </p></item>
 
650
            </taglist>
 
651
            <p>Binding of schedulers are currently only supported on newer
 
652
               Linux and Solaris systems.</p>
 
653
            <p>If no CPU topology is available when the <c>+sbt</c> flag
 
654
               is processed and <c>BindType</c> is any other type than
 
655
               <c>u</c>, the runtime system will fail to start. CPU
 
656
               topology can be defined using the
 
657
               <seealso marker="#+sct">+sct</seealso> flag. Note
 
658
               that the <c>+sct</c> flag may have to be passed before the
 
659
               <c>+sbt</c> flag on the command line (in case no CPU topology
 
660
               has been automatically detected).</p>
 
661
            <p>For more information, see
 
662
            <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(scheduler_bind_type, SchedulerBindType)</seealso>.
 
663
            </p>
 
664
          </item>
 
665
          <tag><c>+sct CpuTopology</c></tag>
 
666
          <item>
 
667
            <marker id="+sct"></marker>
 
668
            <list type="bulleted">
 
669
              <item><c><![CDATA[<Id> = integer(); when 0 =< <Id> =< 65535]]></c></item>
 
670
              <item><c><![CDATA[<IdRange> = <Id>-<Id>]]></c></item>
 
671
              <item><c><![CDATA[<IdOrIdRange> = <Id> | <IdRange>]]></c></item>
 
672
              <item><c><![CDATA[<IdList> = <IdOrIdRange>,<IdOrIdRange> | <IdOrIdRange>]]></c></item>
 
673
              <item><c><![CDATA[<LogicalIds> = L<IdList>]]></c></item>
 
674
              <item><c><![CDATA[<ThreadIds> = T<IdList> | t<IdList>]]></c></item>
 
675
              <item><c><![CDATA[<CoreIds> = C<IdList> | c<IdList>]]></c></item>
 
676
              <item><c><![CDATA[<ProcessorIds> = P<IdList> | p<IdList>]]></c></item>
 
677
              <item><c><![CDATA[<NodeIds> = N<IdList> | n<IdList>]]></c></item>
 
678
              <item><c><![CDATA[<IdDefs> =  <LogicalIds><ThreadIds><CoreIds><ProcessorIds><NodeIds>]]></c></item>
 
679
              <item><c><![CDATA[CpuTopology = <IdDefs>:<IdDefs> | <IdDefs>]]></c></item>
 
680
            </list>
 
681
            <p>Upper-case letters signify real identifiers and lower-case
 
682
               letters signify fake identifiers only used for description
 
683
               of the topology. Identifiers passed as real identifiers may
 
684
               be used by the runtime system when trying to access specific
 
685
               hardware and if they are not correct the behavior is
 
686
               undefined. Faked logical CPU identifiers are not accepted
 
687
               since there is no point in defining the CPU topology without
 
688
               real logical CPU identifiers. Thread, core, processor, and
 
689
               node identifiers may be left out. If left out, thread id
 
690
               defaults to <c>t0</c>, core id defaults to <c>c0</c>,
 
691
               processor id defaults to <c>p0</c>, and node id will
 
692
               be left undefined. Either all processors or no processors
 
693
               should have node identifiers defined.
 
694
             </p>
 
695
             <p>Both increasing and decreasing <c><![CDATA[<IdRange>]]></c>s
 
696
                are allowed.</p>
 
697
             <p>NUMA node identifiers are system wide. That is, each NUMA
 
698
                node on the system have to have a unique identifier. Processor
 
699
                identifiers are also system wide. Core identifiers are
 
700
                processor wide. Thread identifiers are core wide.</p>
 
701
             <p>The order of the identifier types imply the hierarchy of the
 
702
                CPU topology. Currently, the only valid order is: logical,
 
703
                thread, core, processor, node. That is, thread is part of a
 
704
                core which is part of a processor which is part of a NUMA
 
705
                node. This will, however, change in the future, since multiple
 
706
                NUMA nodes can be part of a processor, but this is not
 
707
                supported yet.
 
708
             </p>
 
709
             <p>If a list of identifiers is used in an
 
710
                <c><![CDATA[<IdDefs>]]></c>:</p>
 
711
             <list type="bulleted">
 
712
               <item><c><![CDATA[<LogicalIds>]]></c> have to be a list
 
713
                     of identifiers.</item>
 
714
               <item>At least one other identifier type apart from
 
715
                     <c><![CDATA[<LogicalIds>]]></c> also have to have a
 
716
                     list of identifiers.</item>
 
717
               <item>All lists of identifiers have to produce the
 
718
                     same amount of identifiers.</item>
 
719
             </list>
 
720
             <p>A simple example. A single quad core processor may be
 
721
                described this way:</p>
 
722
<pre>
 
723
% <input>erl +sct L0-3c0-3</input>
 
724
1> <input>erlang:system_info(cpu_topology).</input>
 
725
[{processor,[{core,{logical,0}},
 
726
             {core,{logical,1}},
 
727
             {core,{logical,2}},
 
728
             {core,{logical,3}}]}]
 
729
</pre>
 
730
             <p>A little more complicated example. Two quad core
 
731
                processors. Each processor in its own NUMA node.
 
732
                The ordering of logical processors is a little weird.
 
733
                This in order to give a better example of identifier
 
734
                lists:</p>
 
735
<pre>
 
736
% <input>erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1</input>
 
737
1> <input>erlang:system_info(cpu_topology).</input>
 
738
[{node,[{processor,[{core,{logical,0}},
 
739
                    {core,{logical,1}},
 
740
                    {core,{logical,3}},
 
741
                    {core,{logical,2}}]}]},
 
742
 {node,[{processor,[{core,{logical,7}},
 
743
                    {core,{logical,4}},
 
744
                    {core,{logical,6}},
 
745
                    {core,{logical,5}}]}]}]
 
746
</pre>
 
747
             <p>As long as real identifiers are correct it is okay
 
748
                to pass a CPU topology that is not a correct
 
749
                description of the CPU topology. When used with
 
750
                care this can actually be very useful. This in
 
751
                order to trick the emulator to bind its schedulers
 
752
                as you want. For example, if you want to run multiple
 
753
                Erlang runtime systems on the same machine, you
 
754
                want to reduce the amount of schedulers used and
 
755
                manipulate the CPU topology so that they bind to
 
756
                different logical CPUs. An example, with two Erlang
 
757
                runtime systems on a quad core machine:</p>
 
758
<pre>
 
759
% <input>erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one</input>
 
760
% <input>erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two</input>
 
761
</pre>
 
762
             <p>In this example each runtime system have two
 
763
                schedulers each online, and all schedulers online
 
764
                will run on different cores. If we change to one
 
765
                scheduler online on one runtime system, and three
 
766
                schedulers online on the other, all schedulers
 
767
                online will still run on different cores.</p>
 
768
             <p>Note that a faked CPU topology that does not reflect
 
769
                how the real CPU topology looks like is likely to
 
770
                decrease the performance of the runtime system.</p>
 
771
            <p>For more information, see
 
772
            <seealso marker="erlang#system_flag_cpu_topology">erlang:system_flag(cpu_topology, CpuTopology)</seealso>.</p>
 
773
          </item>
 
774
        </taglist>
 
775
      </item>
608
776
      <tag><c><![CDATA[+T Level]]></c></tag>
609
777
      <item>
610
778
        <marker id="+T"></marker>