Skip to content

gracefully handling mmap failures

Eric Wong git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4use_pack: attempt to handle ENOMEM from mmappackfile.c+6 -31 reply
2/4map_loose_object_1: attempt to handle ENOMEM from mmapobject-file.c packfile.c packfile.h+10 -22 replies
3/4check_packed_git_idx: attempt to handle ENOMEM from mmappackfile.c+5 -10 replies
3/4check_packed_git_idx: attempt to handle ENOMEM from mmap+0 -02 replies
4/4xmmap: inform Linux users of tuning knobs on ENOMEMobject-file.c+7 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] gracefully handling mmap failures

With an out-of-the-box Linux kernel, I encountered failures at all of these mmap call sites via "git cat-file --batch" on a test repo with 100K total alternates.

While upping sys.vm.max_map_count and/or RLIMIT_DATA solves the problem, not all users have administrative privileges to do so.

Eric Wong (4):
use_pack: attempt to handle ENOMEM from mmap
map_loose_object_1: attempt to handle ENOMEM from mmap
check_packed_git_idx: attempt to handle ENOMEM from mmap
xmmap: inform Linux users of tuning knobs on ENOMEM

 object-file.c | 16 ++++++++++++++--
 packfile.c    | 17 ++++++++++++-----
 packfile.h    |  2 ++
 3 files changed, 28 insertions(+), 7 deletions(-)