[RFC/PATCH v3 0/8] readahead: daemon mode

Bartosz Golaszewski bartekgola at gmail.com
Tue Aug 25 11:09:55 UTC 2015


While working on an embedded system running several big services, X-org,
fluxbox, Qt5 etc. where the boot-time was awful, it turned out that the
readahead implementation from systemd (the one that was nuked in 2014)
improves the time needed to start all the programs by a few seconds.

This series introduces a small (LOC < 500) readahead daemon implementation
based on fanotify and readahead syscalls.

This series is also available at:

    https://github.com/brgl/busybox  readahead

v1:
http://lists.busybox.net/pipermail/busybox/2015-August/083236.html

v2:
- made daemon mode optional and disabled by default
- removed patches implementing system calls in busybox

v3:
- reworked the ends_with() function which is now called is_suffixed_with()
  for consistency with is_prefixed_with() and returns char* instead of int
- added unit tests for is_prefixed_with() that also test corner cases
- updated unit tests for is_suffixed_with()
- added detailed comments for both functions
- removed unused code from is_prefixed_with() (any reason to keep it?)
- removed global stopped condition from readahead since signals are handled
  by signalfd, not signal handlers

Bartosz Golaszewski (8):
  libbb: add str_isblank() macro
  libbb: add DECIMAL_STR_MAX macro
  libbb: remove unused code from is_prefixed_with()
  libbb: add unit tests for is_prefixed_with()
  libbb: add a comment describing the way is_prefixed_with() works
  libbb: add is_suffixed_with() function
  libbb: add config_from_fp() and config_free() functions
  readahead: applet extension

 docs/readahead.txt           |  39 +++
 include/libbb.h              |  13 +
 libbb/compare_string_array.c |  63 ++++-
 libbb/parse_config.c         |  27 +-
 libbb/skip_whitespace.c      |  17 ++
 miscutils/Config.src         |  10 +
 miscutils/readahead.c        | 640 ++++++++++++++++++++++++++++++++++++++++++-
 7 files changed, 781 insertions(+), 28 deletions(-)
 create mode 100644 docs/readahead.txt

-- 
2.1.4



More information about the busybox mailing list