Project

General

Profile

Bug #12789

increase timers allowed per-process

Added by Jason King about 1 month ago. Updated 27 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Upstream of Joyent OS-5738 and OS-5806. While this was originally for LX, there's really nothing LX specific about the change, and anyone attempting to run the same programs natively could encounter similar issues (so it seems worthwhile to upstream):

There are certain applications in Linux-land that want to make use of more POSIX timers (i.e., timer_create(3C)) than we currently support. SmartOS has a hard limit of 32 per process that can't be changed. We should look at either increasing the native limit or changing the emulation layer to support more than native allows.

History

#1

Updated by Jason King about 1 month ago

  • Description updated (diff)
#2

Updated by Jason King 29 days ago

Besides being in SmartOS for several years, I ran the new timer test on a BE built with the change, which passes.

#3

Updated by Jason King 28 days ago

With this change, the new max is now 4* NCPU. As before, the tunable timer_max can be increased beyond the new default value as required via /etc/system.

Previously, the kernel would allocate an array of timer_max itimer_t *@s (e.g. @p->p_itimer = kmem_zalloc(timer_max * sizeof (itimer_t *), KM_SLEEP)) on the creation of the first timer. With this change, p_itimer is still only allocated with the creation of the first timer, however the p->p_itimer array initially starts with space for _TIMER_ALLOC_INIT entries and grows as needed (up to timer_max entries).

#4

Updated by Electric Monk 27 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 440a8a36792bdf9ef51639066aab0b7771ffcab8

commit  440a8a36792bdf9ef51639066aab0b7771ffcab8
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-06-12T15:09:53.000Z

    12789 increase timers allowed per-process
    Reviewed by: Ryan Zezeski <rpz@joyent.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Also available in: Atom PDF