From c031f9aa5d7a516af488f4cd4d9c22c4dc748439 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Jun 2020 21:03:02 +0200 Subject: [PATCH] systemnd: configure LimitMEMLOCK for io_uring The io_uring buffer is allocated as memlocked memory, as MPD needs to be able to lock memory. --- systemd/system/mpd.service.in | 3 +++ systemd/user/mpd.service.in | 3 +++ 2 files changed, 6 insertions(+) diff --git a/systemd/system/mpd.service.in b/systemd/system/mpd.service.in index 1086eed1a..4f4c9fff0 100644 --- a/systemd/system/mpd.service.in +++ b/systemd/system/mpd.service.in @@ -16,6 +16,9 @@ ExecStart=@prefix@/bin/mpd --no-daemon LimitRTPRIO=40 LimitRTTIME=infinity +# for io_uring +LimitMEMLOCK=64M + # disallow writing to /usr, /bin, /sbin, ... ProtectSystem=yes diff --git a/systemd/user/mpd.service.in b/systemd/user/mpd.service.in index 0f8c3e9ee..422f60a92 100644 --- a/systemd/user/mpd.service.in +++ b/systemd/user/mpd.service.in @@ -16,6 +16,9 @@ ExecStart=@prefix@/bin/mpd --no-daemon LimitRTPRIO=40 LimitRTTIME=infinity +# for io_uring +LimitMEMLOCK=64M + # disallow writing to /usr, /bin, /sbin, ... ProtectSystem=yes