X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fusing.xml;h=d805097eca1ba54164e9894a104ab481e12569da;hb=8051f46061c7cd03f0fc327f047eb2526d00c924;hp=21e5205022150da4510fe55f7e1cebd245941906;hpb=31478ab93794cd2e0e2a389d76caf43a65c8c3aa;p=ghc-hetmet.git
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 21e5205..d805097 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -842,6 +842,7 @@ ghc -c Foo.hs
program. These are:
,
,
+ ,
,
, and
. The following flags are
@@ -931,6 +932,19 @@ ghc -c Foo.hs
+ :
+
+
+
+ deprecated-flags
+ Causes a warning to be emitted when a deprecated
+ commandline flag is used.
+
+ This option is on by default.
+
+
+
+ :
@@ -982,11 +996,11 @@ ghc -c Foo.hs
imported. This happens unless either the Prelude module is
explicitly imported with an import ... Prelude ...
line, or this implicit import is disabled (either by
- or a
+ or a
LANGUAGE NoImplicitPrelude pragma).
Note that no warning is given for syntax that implicitly
- refers to the Prelude, even if
+ refers to the Prelude, even if
would change whether it refers to the Prelude.
For example, no warning is given when
368 means
@@ -1724,7 +1738,7 @@ f "2" = 2
parallelism.
- Options to enable SMP parallelism
+ Options for SMP parallelismIn order to make use of multiple CPUs, your program must be
linked with the option (see RTS option
Use x simultaneous threads when
running the program. Normally x
- should be chosen to match the number of CPU cores on the machine.
- There is no means (currently) by which this value may vary after
- the program has started.
-
- For example, on a dual-core machine we would probably use
+ should be chosen to match the number of CPU cores on the
+ machineWhether hyperthreading cores should be counted or not is an
+ open question; please feel free to experiment and let us know what
+ results you find.. For example,
+ on a dual-core machine we would probably use
+RTS -N2 -RTS.
- Whether hyperthreading cores should be counted or not is an
- open question; please feel free to experiment and let us know what
- results you find.
+ Setting also has the effect of
+ setting (the number of OS threads to
+ use for garbage collection) to the same value.
+
+ There is no means (currently) by which this value
+ may vary after the program has started.
+
+ The following options affect the way the runtime schedules
+ threads on CPUs:
+
+
+
+
+ RTS
+ option
+
+ Disable automatic migration for load balancing.
+ Normally the runtime will automatically try to schedule
+ threads across the available CPUs to make use of idle
+ CPUs; this option disables that behaviour. It is probably
+ only of use if you are explicitly scheduling threads onto
+ CPUs with GHC.Conc.forkOnIO.
+
+
+
+
+ RTS
+ option
+
+ Migrate a thread to the current CPU when it is woken
+ up. Normally when a thread is woken up after being
+ blocked it will be scheduled on the CPU it was running on
+ last; this option allows the thread to immediately migrate
+ to the CPU that unblocked it.
+
+ The rationale for allowing this eager migration is
+ that it tends to move threads that are communicating with
+ each other onto the same CPU; however there are
+ pathalogical situations where it turns out to be a poor
+ strategy. Depending on the communication pattern in your
+ program, it may or may not be a good idea.
+
+
+ Hints for using SMP parallelism
- Add the -sstderr RTS option when
+ Add the -s RTS option when
running the program to see timing stats, which will help to tell you
whether your program got faster by using more CPUs or not. If the user
time is greater than