• Pavel Emelyanov's avatar
    kdat: Cache kdat object into /run/criu.kdat (v4) · 07a00662
    Pavel Emelyanov authored
    Doing kerndat checks on every criu start is way too slow. We
    need some way to speed this checks up on a particular box.
    
    As suggested by Andre, Dima and Mike let's try to keep the
    collected kdat bits into some tmpfs file. Keeping it on
    tmpfs would invaludate this cache on every machine reboot.
    
    There have been many suggestions how to generate this file,
    my proposal is to create it once the kdat object is filled
    by criu, w/o any explicit command. Optionally we can add
    'criu kdat --save|--drop' actions to manage this file.
    
    v2:
    * don't ignore return code of write() (some glibcs complain)
    * unlink tmp file in case rename failed
    
    v3:
    * add one more magic into kerndat_s which is the 'date +%s'
    * ignore any errors opening or saving cache. Only size/magic
      mismatch matters (and result in dropping the cache)
    * cache file path is Makefile-configurable (RUNDIR)
    * don't save cache if kerndat auto-detection failed
    
    v4:
    * Use ?= for RUNDIR definition.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    07a00662
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...