Skip to content

Commit 3061b0c

Browse files
committed
[roc-setup-hugetlbfs] Update hugepage config files directory
1 parent f4e5063 commit 3061b0c

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

src/roc-setup-hugetlbfs.sh

100644100755
Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/bash
22

33
# Script for setting up hugetlbfs pages & mounts.
4-
# By default allocates 128 of 2 MiB hugepages and 0 of 1 GiB hugepages.
4+
# By default allocates 128 of 2 MiB hugepages and 6 of 1 GiB hugepages.
55
# Defaults can be altered by configuration files containing an integer (see variables HUGEPAGES_XX_CONF for paths).
66

77

8-
HUGEPAGES_2M_CONF="/etc/flpprototype.d/hugepages-2MiB.conf"
9-
HUGEPAGES_2M_SYSFILE="/sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages"
8+
HUGEPAGES_2M_CONF=/etc/flp.d/readoutcard/hugepages-2MiB.conf
9+
HUGEPAGES_2M_SYSFILE=/sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
1010
HUGEPAGES_2M_NUMBER=128
11-
HUGEPAGES_1G_CONF="/etc/flpprototype.d/hugepages-1GiB.conf"
12-
HUGEPAGES_1G_SYSFILE="/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages"
13-
HUGEPAGES_1G_NUMBER=0
11+
HUGEPAGES_1G_CONF=/etc/flp.d/readoutcard/hugepages-1GiB.conf
12+
HUGEPAGES_1G_SYSFILE=/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
13+
HUGEPAGES_1G_NUMBER=6
1414

1515

1616
# Allocate hugepages of each type
@@ -32,21 +32,13 @@ else
3232
fi
3333
echo $HUGEPAGES_1G_NUMBER > $HUGEPAGES_1G_SYSFILE
3434

35-
36-
# Add group for PDA
37-
# This group will be allowed to do PCI things with the driver, and create files in the hugetlbfs mounts
38-
echo "Adding 'pda' group"
39-
groupadd --force pda
40-
41-
4235
# Create hugetlbfs mounts in /var/lib/hugetlbfs/global/...
4336
echo "Creating hugetlbfs mounts"
4437
hugeadm --create-global-mounts
4538
echo "Setting permissions on hugeltbfs mounts"
4639
chgrp -R pda /var/lib/hugetlbfs/global/*
4740
chmod -R g+rwx /var/lib/hugetlbfs/global/*
4841

49-
5042
# Display hugepage status
5143
echo ""
5244
echo "Hugepages:"
@@ -55,4 +47,4 @@ echo ""
5547
echo "Use 'echo [number] > /sys/kernel/mm/hugepages/hugepages-[size]/nr_hugepages' to allocate hugepages manually"
5648
echo "Or set a number in the following conf files and run the script again:"
5749
echo " echo [number] > $HUGEPAGES_2M_CONF"
58-
echo " echo [number] > $HUGEPAGES_1G_CONF"
50+
echo " echo [number] > $HUGEPAGES_1G_CONF"

0 commit comments

Comments
 (0)