Skip to contentSkip to conversation

Is IORING_REGISTER_BUFFERS useful given the current default RLIMIT_MLOCK?

DISCUSSION Drew DeVault 2 participants 3 messages Oct 25, 2021 – Oct 26, 2021 io_uring

lore
Share & tools
lore
#0 lore raw

The current default for RLIMIT_MLOCK is set to 64 KiB. This is not much! This limit was set to this value in 2008 at the request of GnuPG.

I understand that the main audience of io_uring is high-performance servers and such, where configuring the rlimits appropriately is not a particularly burdensome ask. However, this dramatically limits the utility of IORING_REGISTER_BUFFERS in the end-user software use-case, almost such that it's entirely pointless *without* raising the mlock rlimit.

I wonder if we can/should make a case for raising the default rlimit to something more useful for $CURRENTYEAR?

#1 lore raw
Quoted 10 lines · Drew DeVault

The current default for RLIMIT_MLOCK is set to 64 KiB. This is not much! This limit was set to this value in 2008 at the request of GnuPG.

I understand that the main audience of io_uring is high-performance servers and such, where configuring the rlimits appropriately is not a particularly burdensome ask. However, this dramatically limits the utility of IORING_REGISTER_BUFFERS in the end-user software use-case, almost such that it's entirely pointless *without* raising the mlock rlimit.

Quoted 2 lines

I wonder if we can/should make a case for raising the default rlimit to something more useful for $CURRENTYEAR?

If not for the gpg precedent cited, I'd say it's obviously distribution-specific defaults choice territory when it's as simple as what's preset in /etc/security/limits.conf.

Systemd has also been getting its hands a bit dirty in the area of bumping resource limits, which I'm not sure how I feel about. But it does illustrate how downstream is perfectly capable of managing these limits on behalf of users.

Regards,
Vito Caputo

#2 lore raw
Quoted 8 lines · Vito Caputo

If not for the gpg precedent cited, I'd say it's obviously distribution-specific defaults choice territory when it's as simple as what's preset in /etc/security/limits.conf.

Systemd has also been getting its hands a bit dirty in the area of bumping resource limits, which I'm not sure how I feel about. But it does illustrate how downstream is perfectly capable of managing these limits on behalf of users.

Most distros don't touch this default value as far as I'm aware, and the buck, as it were, stops with the kernel. I would prefer to bikeshed this once rather than N times where N is the number of Linux distributions.

Accordingly, should any of the distros prefer the original value, or another value, they're entirely able to configure new defaults according to their preferences.