]> arthur.barton.de Git - bup.git/commit
Eject our pages after save via fmincore
authorRob Browning <rlb@defaultvalue.org>
Sat, 30 May 2015 16:18:26 +0000 (11:18 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 20 Jun 2015 15:55:54 +0000 (10:55 -0500)
commit0f594b25f2850395f077169bd85d688c8e839bb1
treecdd51b8723149e4d30e67e0edebaceb33998bf5d
parent437fedd07ee327c14b11cb19f6c0519ef1e50884
Eject our pages after save via fmincore

Use fmincore and fadvise_done to eject only pages that have become
resident during our save traversal (i.e. via hashsplitting) in
batches (currently 8MB or one VM page, whichever's larger).

Hopefully this will work better than either universal ejection (our
previous behavior), or no ejection (which dramatically slows down save
operations on some systems, perhaps due to competition with access to
the indexes, etc.

Thanks to Nimen Nachname for the initial suggestion, and thanks to Tilo
Schwarz for reporting bugs in a previous version of the patch, and for
noting that we shouldn't wait until the end of a large region before
starting to eject it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Ben Wiederhake <Ben.Wiederhake@gmail.com>
Tested-by: Tilo Schwarz <mail@tilo-schwarz.de>
[rlb@defaultvalue.org: bup_fmincore: add missing malloc result check,
 and missing free(result) when munmap fails to
 437fedd07ee327c14b11cb19f6c0519ef1e50884]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/hashsplit.py
lib/bup/t/thashsplit.py