hugetlb only support 3 max segment, but x86 elf always have 4 segment.

This commit is contained in:
wuxu_wu 2020-12-15 18:39:16 +08:00
parent de147360a5
commit 99c2a39736
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,23 @@
From 09972e4b31efed122c8747c2840bea4fa6615c6c Mon Sep 17 00:00:00 2001
From: wuxu<wuxu.wu@hotmail.com>
Date: Sun, 9 Aug 2020 15:54:55 +0000
Subject: [PATCH] libhugetlbfs: fix max segment cannot adopt the x86
Signed-off-by: wuxu <wuxu.wu@hotmail.com>
diff --git a/elflink.c b/elflink.c
index 2e71522..0f3c228 100644
--- a/elflink.c
+++ b/elflink.c
@@ -158,7 +158,7 @@ static void unmapped_abort(const char *fmt, ...)
/* The directory to use for sharing readonly segments */
static char share_readonly_path[PATH_MAX+1];
-#define MAX_HTLB_SEGS 3
+#define MAX_HTLB_SEGS 4
#define MAX_SEGS 10
struct seg_info {
--
1.8.3.1

View File

@ -2,7 +2,7 @@
Name: libhugetlbfs
Version: 2.22
Release: 1
Release: 2
Summary: A library which provides easy access to huge pages of memory
License: LGPLv2+
URL: https://github.com/libhugetlbfs/libhugetlbfs
@ -13,6 +13,7 @@ Patch0000: 0000-build_flags.patch
Patch9000:libhugetlbfs-2.16-remap_segments_with_MAP_SHARED.patch
Patch9001:libhugetlbfs-2.16-remap_segments_with_MAP_SHARED-2.patch
Patch9002:libhugetlbfs-make-cflags.patch
Patch9003:libhugetlbfs-fix-max-segment-cannot-adopt-the-x86.patch
BuildRequires: gcc glibc-devel glibc-static
@ -84,6 +85,12 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/hugepages.conf
%changelog
* Tue Dec 15 2020 wuxu<wuxu.wu@hotmail.com> - 2.22-2
- Type:enhancement
- ID:NA
- SUG:restart
- DESC: fix max segment cannot adopt the x86
* Fri Apr 24 2020 lihongjiang<lihongjiang6@huawei.com> - 2.22-1
- Type:enhancement
- ID:NA