io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is IORING_REGISTER_BUFFERS useful given the current default RLIMIT_MLOCK?
@ 2021-10-25 13:58 Drew DeVault
  2021-10-25 15:42 ` Vito Caputo
  0 siblings, 1 reply; 3+ messages in thread
From: Drew DeVault @ 2021-10-25 13:58 UTC (permalink / raw)
  To: io-uring

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is IORING_REGISTER_BUFFERS useful given the current default RLIMIT_MLOCK?
  2021-10-25 13:58 Is IORING_REGISTER_BUFFERS useful given the current default RLIMIT_MLOCK? Drew DeVault
@ 2021-10-25 15:42 ` Vito Caputo
  2021-10-26  7:12   ` Drew DeVault
  0 siblings, 1 reply; 3+ messages in thread
From: Vito Caputo @ 2021-10-25 15:42 UTC (permalink / raw)
  To: Drew DeVault; +Cc: io-uring

On Mon, Oct 25, 2021 at 03:58:33PM +0200, Drew DeVault wrote:
> 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?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is IORING_REGISTER_BUFFERS useful given the current default RLIMIT_MLOCK?
  2021-10-25 15:42 ` Vito Caputo
@ 2021-10-26  7:12   ` Drew DeVault
  0 siblings, 0 replies; 3+ messages in thread
From: Drew DeVault @ 2021-10-26  7:12 UTC (permalink / raw)
  To: Vito Caputo; +Cc: io-uring

On Mon Oct 25, 2021 at 5:42 PM CEST, Vito Caputo wrote:
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-26  7:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 13:58 Is IORING_REGISTER_BUFFERS useful given the current default RLIMIT_MLOCK? Drew DeVault
2021-10-25 15:42 ` Vito Caputo
2021-10-26  7:12   ` Drew DeVault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).