diff options
author | Lukas Larsson <[email protected]> | 2014-02-23 18:26:38 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 15:16:07 +0100 |
commit | a35d0f5f82f8152f1b953eda039807a7d4f4e9b9 (patch) | |
tree | 0410287577061d3ed630e76608bc865613c2b19d /erts/emulator/sys | |
parent | 2bf4f22a9488d94ac1fc3c72a4e9d84151744004 (diff) | |
download | otp-a35d0f5f82f8152f1b953eda039807a7d4f4e9b9.tar.gz otp-a35d0f5f82f8152f1b953eda039807a7d4f4e9b9.tar.bz2 otp-a35d0f5f82f8152f1b953eda039807a7d4f4e9b9.zip |
ose: Thread priorities configurable from lmconf
The pattern used for getting the priority from the lmconf
is based on the name of the process created. The pattern is:
ERTS_%%PROCESS_NAME%%_PRIO
with the %%PROCESS_NAME%% replaced by the prefix of the process
the priority applies to. eg:
ERTS_SCHEDULER_PRIO=24
applies to processes with name SCHEDULER_1, SCHEDULER_2 etc.
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r-- | erts/emulator/sys/ose/default.lmconf | 6 | ||||
-rw-r--r-- | erts/emulator/sys/ose/sys.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/erts/emulator/sys/ose/default.lmconf b/erts/emulator/sys/ose/default.lmconf index 17b7a1e5fa..a66b0ece56 100644 --- a/erts/emulator/sys/ose/default.lmconf +++ b/erts/emulator/sys/ose/default.lmconf @@ -13,6 +13,12 @@ HEAP_SMALL_BUF_INIT_SIZE=64000000 HEAP_LARGE_BUF_THRESHOLD=16000000 HEAP_LOCK_TYPE=2 +ERTS_DEFAULT_PRIO=24 +ERTS_SCHEDULER_PRIO=24 +ERTS_ASYNC_PRIO=22 +ERTS_AUX_PRIO=24 +ERTS_SYS_MSG_DISPATCHER_PRIO=21 + # Setting the environment variable EFS_RESOLVE_TMO on the block to 0. # This will eliminiate delays when trying to open files on not mounted # volumes. diff --git a/erts/emulator/sys/ose/sys.c b/erts/emulator/sys/ose/sys.c index beb7f5944f..88dbd7fcf8 100644 --- a/erts/emulator/sys/ose/sys.c +++ b/erts/emulator/sys/ose/sys.c @@ -50,6 +50,14 @@ #include "efs.h" #include "erl_printf.h" +/* Set the define to 1 to get some logging */ +#if 0 +#include "ramlog.h" +#define LOG(output) ramlog_printf output +#else +#define LOG(output) +#endif + extern char **environ; static erts_smp_rwmtx_t environ_rwmtx; @@ -68,7 +76,7 @@ static erts_smp_rwmtx_t environ_rwmtx; #include "erl_cpu_topology.h" /* The priority for reader/writer processes */ -#define FD_PROC_PRI 20 +#define FD_PROC_PRI get_pri(current_process()) typedef struct ErtsSysReportExit_ ErtsSysReportExit; struct ErtsSysReportExit_ { |