Resource controls and agent-influenced design
By sch on Jun 30, 2004
Eric mentioned the agent LWP technique a few days ago. I thought I would point out that the resource controls facility was expressly designed with the agent's capabilities in mind. This choice lets us have an interface like:
int setrctl(const char \*controlname, rctlblk_t \*old_blk, rctlblk_t \*new_blk, uint_t flags);
where the action of setting a resource control value applies to the current process or a process collective that encloses it (like a task, project, or zone). (As opposed to an interface that requires an (idtype_t, id_t) pair to specify its target.) Making this choice means we don't end up having a lot of difficult locking scenarios, as we just insert an agent LWP into a victim process to modify the settings on its task.
Resource controls, when they were introduced in S9, brought in some new useful controls, like
project.cpu-shares, as well as handling both
setrlimit(2) calls in a compatible fashion. But S10 has seen the introduction of a number
of very useful controls: for instance, the System V IPC tunables have been replaced by a set of resource controls, so that you can dynamically change these settings (and apply different constraints to different projects) without
a reboot. Dave Powell deserves the credit for this much appreciated piece of work. New controls associated with
cryptographic capabilities, zones, and general resource handling have also appeared. And Steve Lawrence spent a
fair bit of time looking at making
prctl(1) output actually human-readable.
So it's all much improved from the initial work.