The following commit has been merged in the openafs-stable-1_8_x branch:
commit 39272929fc528a4c6af05e74b98518a3bae18462
Author: Andrew Deason <[email protected]>
Date: Thu May 10 16:22:52 2018 -0500
ubik: Buffer log writes with stdio
Currently, when we write ubik i/o operations to the db log, we tend to
issue several syscalls involving small writes and fstat()s. This is
because each "log" operation involves at least one write, and each log
operation tends to be pretty small.
Each logged operation hitting disk separately is unnecessary, since
the db log does not need to hit the disk at all until we are ready to
commit the transaction. So to reduce the number of syscalls when
writing to the db, change our log writes to be buffered in memory
(using stdio calls). This also avoids needing to fstat() the
underlying log file, since we open the underlying file in append-only
mode, since we only ever append to (and truncate) the log file.
To implement this, we introduce a new 'buffered_append' phys
operation, to explicitly separate our buffered and non-buffered
operations, to try to avoid any bugs from mixing buffered and
non-buffered i/o. This new operation is only used for the db log.
Reviewed-on: https://gerrit.openafs.org/13070
Reviewed-by: Mark Vitale <[email protected]>
Reviewed-by: Michael Meffie <[email protected]>
Reviewed-by: Joe Gorse <[email protected]>
Reviewed-by: Benjamin Kaduk <[email protected]>
Reviewed-by: Marcio Brito Barbosa <[email protected]>
Tested-by: BuildBot <[email protected]>
(cherry picked from commit 800318b43fdf461ad95cd7f3940718f3f0a609a7)
Change-Id: Ia40d75e7bdeb6a9f6c316aaea6fd20d5c8d80625
Reviewed-on: https://gerrit.openafs.org/13353
Reviewed-by: Michael Meffie <[email protected]>
Reviewed-by: Mark Vitale <[email protected]>
Reviewed-by: Marcio Brito Barbosa <[email protected]>
Reviewed-by: Cheyenne Wills <[email protected]>
Tested-by: BuildBot <[email protected]>
Reviewed-by: Stephan Wiesand <[email protected]>
src/ubik/disk.c | 41 +++------------------------
src/ubik/phys.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/ubik/ubik.c | 1 +
src/ubik/ubik.p.h | 3 ++
4 files changed, 87 insertions(+), 36 deletions(-)
--
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs