mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-04 21:39:50 +00:00
feat: enable automounting of hugepages with 1GB pagesize if the karg hugepagesz=1G is present (#425)
This commit is contained in:
parent
922efd7d8b
commit
24b3a66f36
@ -283,6 +283,7 @@ RUN /tmp/image-info.sh && \
|
|||||||
systemctl enable ublue-update.timer && \
|
systemctl enable ublue-update.timer && \
|
||||||
systemctl enable bazzite-hardware-setup.service && \
|
systemctl enable bazzite-hardware-setup.service && \
|
||||||
systemctl enable tailscaled.service && \
|
systemctl enable tailscaled.service && \
|
||||||
|
systemctl enable dev-hugepages1G.mount && \
|
||||||
systemctl --global enable bazzite-user-setup.service && \
|
systemctl --global enable bazzite-user-setup.service && \
|
||||||
if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
|
if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
|
||||||
sed -i '/^PRETTY_NAME/s/Kinoite/Bazzite/' /usr/lib/os-release && \
|
sed -i '/^PRETTY_NAME/s/Kinoite/Bazzite/' /usr/lib/os-release && \
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
# This file is a modified version of dev-hugepages.mount from systemd.
|
||||||
|
#
|
||||||
|
# With this unit file enabled you can set 1GB hugepages using kernel args
|
||||||
|
# and have them auto mounted, just as you would with 2MB hugepages.
|
||||||
|
#
|
||||||
|
# For normal systems use "hugepagesz=1G hugepages=16"
|
||||||
|
# to allocate 16 hugepages with a pagesize of 1GB
|
||||||
|
#
|
||||||
|
# For systems with numa nodes use "hugepagesz=1G hugepages=0:16"
|
||||||
|
# to allocate 16 hugepages on numa node 0 with a pagesize of 1GB
|
||||||
|
#
|
||||||
|
# For more info, consult the kernel.org documentation linked in this file
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=1GB Huge Pages File System
|
||||||
|
Documentation=https://docs.kernel.org/admin-guide/mm/hugetlbpage.html
|
||||||
|
Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
|
||||||
|
ConditionPathExists=/sys/kernel/mm/hugepages
|
||||||
|
DefaultDependencies=no
|
||||||
|
ConditionCapability=CAP_SYS_ADMIN
|
||||||
|
ConditionVirtualization=!private-users
|
||||||
|
ConditionKernelCommandLine=hugepagesz=1G
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
[Mount]
|
||||||
|
What=hugetlbfs
|
||||||
|
Where=/dev/hugepages1G
|
||||||
|
Type=hugetlbfs
|
||||||
|
Options=pagesize=1G
|
Loading…
x
Reference in New Issue
Block a user