5
5
6
6
SHMEM_PATH=" ${FD_SHMEM_PATH:-/ mnt/ .fd} "
7
7
8
- ALL_TYPES=" gigantic huge normal "
8
+ ALL_TYPES=" gigantic huge"
9
9
10
10
# Disabling SC2128, more context here -> https://stackoverflow.com/questions/35006457/choosing-between-0-and-bash-source
11
11
# shellcheck disable=SC2128
12
12
BIN=$( dirname -- " $BASH_SOURCE " )
13
13
NUMA_CNT=` $BIN /fd_shmem_ctl numa-cnt --log-path " " 2> /dev/null`
14
14
15
15
get_page_size () {
16
- if [ " $1 " = " normal" ]; then
17
- echo 4096
18
16
elif [ " $1 " = " huge" ]; then
19
17
echo 2097152
20
18
elif [ " $1 " = " gigantic" ]; then
@@ -100,16 +98,7 @@ init() {
100
98
# system DRAM (in the proc/meminfo total memory sense) for maximum
101
99
# flexibility. Since the pages themselves are large, the number of
102
100
# inodes required in the mount is still quite small practically.
103
- # For normal pages, we need to use a tmpfs.
104
101
try_defrag_memory 2> /dev/null > /dev/null
105
- if [ " $t " = " normal" ]; then
106
- mount -v -t tmpfs tmpfs $MNT_PATH
107
- if [ " $? " != " 0" ]; then
108
- echo " init $1 $2 $3 : fail, mount failed"
109
- echo " Do $0 help for help"
110
- exit 1
111
- fi
112
- else
113
102
msz=` awk ' /^MemTotal:/ {print $2}' /proc/meminfo` # In KiB
114
103
psz=` get_page_size $t `
115
104
msz=$(( psz* ((1024 * msz)/ psz)) ) # Round down to whole pages to be on safe side
@@ -172,15 +161,6 @@ fini() {
172
161
173
162
query () {
174
163
echo " "
175
- for t in $ALL_TYPES ; do
176
- if [ " $t " != " normal" ]; then
177
- echo " $t pages:"
178
- for(( n= 0 ;n< NUMA_CNT;n++ )) ; do
179
- echo -e " \tnuma $n : ` get_page_total $t $n ` total, ` get_page_free $t $n ` free"
180
- done
181
- echo " "
182
- fi
183
- done
184
164
if [ -d $SHMEM_PATH ]; then
185
165
echo " FD_SHMEM_PATH=$SHMEM_PATH "
186
166
echo " "
@@ -204,12 +184,6 @@ alloc() {
204
184
TYPE=$2
205
185
NUMA=$3
206
186
207
- if [ " $TYPE " = " normal" ]; then
208
- echo " alloc $1 $2 $3 : fail, normal pages do not require explicit allocation"
209
- echo " Do $0 help for help"
210
- exit 1
211
- fi
212
-
213
187
T=` get_page_total $TYPE $NUMA `
214
188
F=` get_page_free $TYPE $NUMA `
215
189
if [ " $T " != " $F " ]; then
@@ -302,12 +276,11 @@ while [ $# -gt 0 ]; do
302
276
echo " "
303
277
echo " alloc [PAGE_CNT] [PAGE_TYPE] [NUMA_NODE]"
304
278
echo " - Reserve [PAGE_CNT] [PAGE_TYPE] DRAM-backed pages on numa [NUMA_NODE]"
305
- echo " systemwide. Does not apply to normal pages. "
279
+ echo " systemwide."
306
280
echo " - This likely needs to run as a superuser or with sudo."
307
281
echo " "
308
282
echo " free [PAGE_TYPE] [NUMA_NODE]"
309
283
echo " - Equivalent to alloc 0 [PAGE_TYPE] [NUMA_NODE]."
310
- echo " - Does not apply to normal pages."
311
284
echo " - This likely needs to run as a superuser or with sudo."
312
285
echo " "
313
286
echo " query"
0 commit comments