Age | Commit message (Collapse) | Author |
|
|
|
|
|
Also, change HandlerId from logger_simple to simple.
|
|
* john/kernel/add-file_int-to-release:
Add file_int.hrl to release target
|
|
|
|
|
|
* dgud/kernel/refc_sched_wall_time/OTP-11694:
test: spawn scheduler_wall_time flag holder
Turn on scheduler_wall_time in an alive process
Redirect system_flag(scheduler_wall_time,_) to kernel_refc
kernel: add a resource reference counter
|
|
System resources/functionality may need to be reference counted
to be handled correctly when used or enabled/disabled from more
than one process or application.
It is easier to handle this in erlang code than in erts, so make a
process that deals with the housekeeping.
|
|
This improves the latency of file operations as dirty schedulers
are a bit more eager to run jobs than async threads, and use a
single global queue rather than per-thread queues, eliminating the
risk of a job stalling behind a long-running job on the same thread
while other async threads sit idle.
There's no such thing as a free lunch though; the lowered latency
comes at the cost of increased busy-waiting which may have an
adverse effect on some applications. This behavior can be tweaked
with the +sbwt flag, but unfortunately it affects all types of
schedulers and not just dirty ones. We plan to add type-specific
flags at a later stage.
sendfile has been moved to inet_drv to lessen the effect of a nasty
race; the cooperation between inet_drv and efile has never been
airtight and the socket dying at the wrong time (Regardless of
reason) could result in fd aliasing. Moving it to the inet driver
makes it impossible to trigger this by closing the socket in the
middle of a sendfile operation, while still allowing it to be
aborted -- something that can't be done if it stays in the file
driver.
The race still occurs if the controlling process dies in the short
window between dispatching the sendfile operation and the dup(2)
call in the driver, but it's much less likely to happen now.
A proper fix is in the works.
--
Notable functional differences:
* The use_threads option for file:sendfile/5 no longer has any
effect.
* The file-specific DTrace probes have been removed. The same
effect can be achieved with normal tracing together with the
nif__entry/nif__return probes to track scheduling.
--
OTP-14256
|
|
|
|
This patch adds a mechanism by which shell history gets stored
persistently on disk and gets loaded whenever a new shell session
begins.
The log files are added to the user's cache directory, with multiple
files in it, although the location is configurable.
All Erlang instances on a given host will share the same log file.
There are two hook points in group.erl that are used: when instantiating
the buffer, where we fetch from disk, and when adding a line to the
buffer (gets stored).
This allows all shell instances to use the same base set of lines when
loaded, but to keep their history separate after the fact. As lines are
added as you go, a new shell session (with ^G -> s -> c) will have
access to previous sessions' lines.
The implementation makes use of the disk_log library with a rotating log
in order to store data, and allow automated repairs.
By default, the feature is disabled and must be turned on through OTP
environment variable part of the kernel application. The options
include:
| Option | Accepted values | Default | Description |
| ------------------------ | ----------------- |---------- | -------------------- |
| shell_history | enabled, disabled | disabled | turn feature on/off |
| shell_history_path | any string | user cache| where to put files |
| shell_history_file_bytes | 51200..N bytes | 512kb | max data size (>50kb)|
| shell_history_drop | ["q().", ...] | [] | blacklisted lines |
A version header is added to the disk_log configuration, allowing
changes in the storage format to be enacted in the future (i.e. adding
segmentation by node name in the same file, or encoding) without
conflict.
Log rotation is used with multiple log files to ensure proper
enforcement of resizing without too much data loss. Because disk_log
does not allow to just flush bits of content on rewrite (it truncates
any full file), we instead use a wrap log and try to divide the
configured size into up to 10 log files so that every time we rotate a
log, we lose only 10% of the data. This remains true for corrupted files
that cannot fully be repaired.
This many-logs-based approach in turn forces the use of a minimal log
size for the `shell_history_file_bytes` configuration, since it has to
be divided by 10.
The shell history is not loaded for the `user` process which, despite
running the group.erl module, does not actually require history as it
mostly just forwards IO protocol information.
|
|
|
|
|
|
|
|
Sometimes we install *.erl files. Some these files include a private
*.hrl files, so in order to make these *.erl files usable we have to
install these private includes as well.
Signed-off-by: Peter Lemenkov <[email protected]>
|
|
|
|
|
|
* nox/enable-silent-rules/OTP-10726:
Implement ./otp_build configure --enable-silent-rules
|
|
With silent rules, the output of make is less verbose and compilation
warnings are easier to spot. Silent rules are disabled by default and
can be disabled or enabled at will by make V=0 and make V=1.
|
|
|
|
|
|
OTP-10106
OTP-10107
|
|
|
|
|
|
|
|
|
|
|