Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sd-readahead(7) [xfree86 man page]

SD-READAHEAD(7) 						   sd-readahead 						   SD-READAHEAD(7)

NAME
sd-readahead - Reference implementation of APIs for controlling boot-time read-ahead SYNOPSIS
#include "sd-readahead.h" DESCRIPTION
sd-readahead.c and sd-readahead.h provide a reference implementation for APIs for controlling boot-time read-ahead, as implemented by the read-ahead subsystem of the systemd(1) init system. See sd_readahead(3) for more information about the function implemented. NOTES
This interface is provided by the reference implementation of APIs for controlling boot-time read-ahead and distributed with the systemd package. The algorithms it implements are simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation. See the respective function man pages for details. In addition, for details about the algorithms check the liberally licensed reference implementation sources: http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c resp. http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h These APIs are implemented in the reference implementation's drop-in sd-readahead.c and sd-readahead.h files. It is recommended that applications consuming these APIs copy the implementation into their source tree, either verbatim or in excerpts. These interfaces are currently not available in a dynamic library. The functions provided by this interface become NOPs when -DDISABLE_SYSTEMD is set during compilation. In addition, if sd-readhead.c is compiled on non-Linux systems it becomes NOPs. SEE ALSO
systemd(1), sd_readahead(3), sd-daemon(7) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 03/16/2012 SD-READAHEAD(7)

Check Out this Related Man Page

SD_READAHEAD(3) 						   sd_readahead 						   SD_READAHEAD(3)

NAME
sd_readahead - Control ongoing disk boot-time read-ahead operations SYNOPSIS
#include "sd-readahead.h" int sd_readahead(const char *action); DESCRIPTION
sd_readahead() may be called by programs involved with early boot-up to control ongoing boot-time disk read-ahead operations. It may be used to terminate read-ahead operations in case an uncommon disk access pattern is to be expected and hence read-ahead replay or collection is unlikely to have the desired speed-up effect on the current or future boot-ups. The action should be one of the following strings: cancel Terminates read-ahead data collection, and drops all read-ahead data collected during this boot-up. done Terminates read-ahead data collection, but keeps all read-ahead data collected during this boot-up around for use during subsequent boot-ups. noreplay Terminates read-ahead replay. RETURN VALUE
On failure, these calls return a negative errno-style error code. It is generally recommended to ignore the return value of this call. NOTES
This function is provided by the reference implementation of APIs for controlling boot-time read-ahead and distributed with the systemd package. The algorithm it implements is simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation. Internally, this function creates a file in /run/systemd/readahead/ which is then used as flag file to notify the read-ahead subsystem. For details about the algorithm check the liberally licensed reference implementation sources: http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c resp. http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h sd_readahead() is implemented in the reference implementation's drop-in sd-readahead.c and sd-readahead.h files. It is recommended that applications consuming this API copy the implementation into their source tree. For more details about the reference implementation see sd- readahead(7) If -DDISABLE_SYSTEMD is set during compilation this function will always return 0 and otherwise become a NOP. EXAMPLES
Example 1. Cancelling all read-ahead operations During boots where SELinux has to relabel the file system hierarchy, it will create a large amount of disk accesses that are not necessary during normal boots. Hence it is a good idea to disable both read-ahead replay and read-ahead collection. sd_readahead("cancel"); sd_readahead("noreplay"); SEE ALSO
systemd(1), sd-readahead(7), daemon(7) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 SD_READAHEAD(3)
Man Page