Home | History | Annotate | Download | only in common
History log of /src/sys/compat/linux/common/linux_limit.h
RevisionDateAuthorComments
 1.10  01-Oct-2024  riastradh sys/compat/linux/common: Nix trailing whitespace, and one blank line.

No functional change intended.
 1.9  12-May-2024  christos PR/58240: Ricardo Branco: Add missing limits
 1.8  02-Dec-2021  ryo add prlimit64(2) syscall to COMPAT_LINUX and COMPAT_LINUX32
 1.7  28-Feb-2015  njoly When converting limits from linux32 (int32_t) to native (uint64_t),
cast it to unsigned first to avoid bad side effect for negative
values.
 1.6  22-Sep-2012  joerg branches: 1.6.14;
LINUX_RLIM_INFINITY doesn't fit into the value range for linux32, so
introduce a variant with correct value.
 1.5  29-Mar-2009  mrg branches: 1.5.12; 1.5.22;
- add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes. this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS. (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information. (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897. it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
 1.4  15-Mar-2009  cegger ansify function definitions
 1.3  28-Apr-2008  martin branches: 1.3.8; 1.3.10; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2  04-Dec-2007  dsl branches: 1.2.12; 1.2.14; 1.2.16;
Remove all the __P
 1.1  09-Feb-2006  manu branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22; 1.1.46; 1.1.48; 1.1.54; 1.1.58;
Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64
 1.1.58.1  08-Dec-2007  ad Sync with head.
 1.1.54.1  08-Dec-2007  mjf Sync with HEAD.
 1.1.48.1  09-Jan-2008  matt sync with HEAD
 1.1.46.1  09-Dec-2007  jmcneill Sync with HEAD.
 1.1.22.2  09-Sep-2006  rpaulo sync with head
 1.1.22.1  09-Feb-2006  rpaulo file linux_limit.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:45:52 +0000
 1.1.16.3  07-Dec-2007  yamt sync with head
 1.1.16.2  21-Jun-2006  yamt sync with head.
 1.1.16.1  09-Feb-2006  yamt file linux_limit.h was added on branch yamt-lazymbuf on 2006-06-21 14:59:12 +0000
 1.1.10.2  22-Apr-2006  simonb Sync with head.
 1.1.10.1  09-Feb-2006  simonb file linux_limit.h was added on branch simonb-timecounters on 2006-04-22 11:38:13 +0000
 1.1.2.2  18-Feb-2006  yamt sync with head.
 1.1.2.1  09-Feb-2006  yamt file linux_limit.h was added on branch yamt-uio_vmspace on 2006-02-18 15:38:59 +0000
 1.2.16.2  04-May-2009  yamt sync with head.
 1.2.16.1  16-May-2008  yamt sync with head.
 1.2.14.1  18-May-2008  yamt sync with head.
 1.2.12.1  02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.10.1  01-Apr-2009  snj Pull up following revision(s) (requested by mrg in ticket #622):
bin/csh/csh.1: revision 1.46
bin/csh/func.c: revision 1.37
bin/ps/print.c: revision 1.111
bin/ps/ps.c: revision 1.74
bin/sh/miscbltin.c: revision 1.38
bin/sh/sh.1: revision 1.92 via patch
external/bsd/top/dist/machine/m_netbsd.c: revision 1.7
lib/libkvm/kvm_proc.c: revision 1.82
sys/arch/mips/mips/cpu_exec.c: revision 1.55
sys/compat/darwin/darwin_exec.c: revision 1.57
sys/compat/ibcs2/ibcs2_exec.c: revision 1.73
sys/compat/irix/irix_resource.c: revision 1.15
sys/compat/linux/arch/amd64/linux_exec_machdep.c: revision 1.16
sys/compat/linux/arch/i386/linux_exec_machdep.c: revision 1.12
sys/compat/linux/common/linux_limit.h: revision 1.5
sys/compat/osf1/osf1_resource.c: revision 1.14
sys/compat/svr4/svr4_resource.c: revision 1.18
sys/compat/svr4_32/svr4_32_resource.c: revision 1.17
sys/kern/exec_subr.c: revision 1.62
sys/kern/init_sysctl.c: revision 1.160
sys/kern/kern_exec.c: revision 1.288
sys/kern/kern_resource.c: revision 1.151
sys/sys/param.h: patch
sys/sys/resource.h: revision 1.31
sys/sys/sysctl.h: revision 1.184
sys/uvm/uvm_extern.h: revision 1.153
sys/uvm/uvm_glue.c: revision 1.136
sys/uvm/uvm_mmap.c: revision 1.128
usr.bin/systat/ps.c: revision 1.32
- - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes. this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.
- - adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.
- - add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)
- - patch sh, and csh to notice RLIMIT_AS. (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)
- - patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.
- - update irix, svr4, svr4_32, linux and osf1 emulations to support
this information. (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)
this addresses PR 7897. it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.
tested on i386 and sparc64, build tested on several other platforms.
thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
 1.3.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.5.22.2  03-Dec-2017  jdolecek update from HEAD
 1.5.22.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.12.1  30-Oct-2012  yamt sync with head
 1.6.14.1  06-Apr-2015  skrll Sync with HEAD

RSS XML Feed