Home » Mailing lists » Devel » [PATCH] BC: resource beancounters (v2)
[PATCH] BC: resource beancounters (v2) [message #5542] |
Wed, 23 August 2006 10:44  |
dev
Messages: 1693 Registered: September 2005 Location: Moscow
|
Senior Member |

|
|
The following patch set presents base of
Resource Beancounters (BC).
BC allows to account and control consumption
of kernel resources used by group of processes.
Draft UBC description on OpenVZ wiki can be found at
http://wiki.openvz.org/UBC_parameters
The full BC patch set allows to control:
- kernel memory. All the kernel objects allocatable
on user demand should be accounted and limited
for DoS protection.
E.g. page tables, task structs, vmas etc.
- virtual memory pages. BCs allow to
limit a container to some amount of memory and
introduces 2-level OOM killer taking into account
container's consumption.
pages shared between containers are correctly
charged as fractions (tunable).
- network buffers. These includes TCP/IP rcv/snd
buffers, dgram snd buffers, unix, netlinks and
other buffers.
- minor resources accounted/limited by number:
tasks, files, flocks, ptys, siginfo, pinned dcache
mem, sockets, iptentries (for containers with
virtualized networking)
As the first step we want to propose for discussion
the most complicated parts of resource management:
kernel memory and virtual memory.
The patch set to be sent provides core for BC and
management of kernel memory only. Virtual memory
management will be sent in a couple of days.
The patches in these series are:
diff-bc-kconfig.patch:
Adds kernel/bc/Kconfig file with UBC options and
includes it into arch Kconfigs
diff-bc-core.patch:
Contains core functionality and interfaces of BC:
find/create beancounter, initialization,
charge/uncharge of resource, core objects' declarations.
diff-bc-task.patch:
Contains code responsible for setting BC on task,
it's inheriting and setting host context in interrupts.
Task contains three beancounters:
1. exec_bc - current context. all resources are charged
to this beancounter.
2. fork_bc - beancounter which is inherited by
task's children on fork
diff-bc-syscalls.patch:
Patch adds system calls for BC management:
1. sys_get_bcid - get current BC id
2. sys_set_bcid - changes exec_ and fork_ BCs on current
3. sys_set_bclimit - set limits for resources consumtions
4. sys_get_bcstat - returns limits/usages/fails for BC
diff-bc-kmem-core.patch:
Introduces BC_KMEMSIZE resource which accounts kernel
objects allocated by task's request.
Objects are accounted via struct page and slab objects.
For the latter ones each slab contains a set of pointers
corresponding object is charged to.
Allocation charge rules:
1. Pages - if allocation is performed with __GFP_BC flag - page
is charged to current's exec_bc.
2. Slabs - kmem_cache may be created with SLAB_BC flag - in this
case each allocation is charged. Caches used by kmalloc are
created with SLAB_BC | SLAB_BC_NOCHARGE flags. In this case
only __GFP_BC allocations are charged.
diff-bc-kmem-charge.patch:
Adds SLAB_BC and __GFP_BC flags in appropriate places
to cause charging/limiting of specified resources.
Summary of changes from v1 patch set:
* CONFIG_BEANCOUNTERS is 'n' by default
* fixed Kconfig includes in arches
* removed hierarchical beancounters to simplify first patchset
* removed unused 'private' pointer
* removed unused EXPORTS
* MAXVALUE redeclared as LONG_MAX
* beancounter_findcreate clarification
* renamed UBC -> BC, ub -> bc etc.
* moved BC inheritance into copy_process
* introduced reset_exec_bc() with proposed BUG_ON
* removed task_bc beancounter (not used yet, for numproc)
* fixed syscalls for sparc
* added sys_get_bcstat(): return info that was in /proc
* cond_syscall instead of #ifdefs
Thanks to Oleg Nesterov, Alan Cox, Matt Helsley and
others for patch review and comments.
Patch set is applicable to 2.6.18-rc4-mm2
Thanks,
Kirill
|
|
|
 |
|
[PATCH] BC: resource beancounters (v2)
By: dev on Wed, 23 August 2006 10:44
|
 |
|
[PATCH 1/6] BC: kconfig
By: dev on Wed, 23 August 2006 10:59
|
 |
|
Re: [PATCH 1/6] BC: kconfig
|
 |
|
Re: [PATCH 1/6] BC: kconfig
|
 |
|
Re: [PATCH 1/6] BC: kconfig
|
 |
|
Re: [PATCH 1/6] BC: kconfig
By: dev on Fri, 25 August 2006 11:27
|
 |
|
Re: [PATCH 1/6] BC: kconfig
By: dev on Fri, 25 August 2006 11:31
|
 |
|
Re: [PATCH 1/6] BC: kconfig
By: rdunlap on Wed, 23 August 2006 22:29
|
 |
|
Re: [PATCH 1/6] BC: kconfig
|
 |
|
Re: [PATCH 1/6] BC: kconfig
|
 |
|
Re: [ckrm-tech] [PATCH 1/6] BC: kconfig
By: dev on Thu, 24 August 2006 11:47
|
 |
|
Re: [ckrm-tech] [PATCH 1/6] BC: kconfig
|
 |
|
[PATCH 2/6] BC: beancounters core (API)
By: dev on Wed, 23 August 2006 11:00
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
By: dev on Wed, 23 August 2006 13:25
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
By: dev on Wed, 23 August 2006 13:46
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
By: dev on Thu, 24 August 2006 12:03
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
By: dev on Fri, 25 August 2006 10:51
|
 |
|
Re: [PATCH 2/6] BC: beancounters core (API)
|
 |
|
[PATCH 3/6] BC: context inheriting and changing
By: dev on Wed, 23 August 2006 11:02
|
 |
|
[PATCH 4/6] BC: user interface (syscalls)
By: dev on Wed, 23 August 2006 11:03
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
By: dev on Wed, 23 August 2006 13:40
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
By: Alan Cox on Wed, 23 August 2006 17:08
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
By: Alan Cox on Thu, 24 August 2006 10:42
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
By: dev on Fri, 25 August 2006 10:54
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
|
 |
|
Re: [PATCH 4/6] BC: user interface (syscalls)
|
 |
|
[PATCH 5/6] BC: kernel memory accounting (core)
By: dev on Wed, 23 August 2006 11:04
|
 |
|
Re: [PATCH 5/6] BC: kernel memory accounting (core)
|
 |
|
Re: [PATCH 5/6] BC: kernel memory accounting (core)
|
 |
|
Re: [PATCH 5/6] BC: kernel memory accounting (core)
By: dev on Fri, 25 August 2006 10:06
|
 |
|
[PATCH 6/6] BC: kernel memory accounting (marks)
By: dev on Wed, 23 August 2006 11:05
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
By: dev on Tue, 29 August 2006 09:52
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
By: dev on Tue, 29 August 2006 14:34
|
 |
|
Re: [PATCH 6/6] BC: kernel memory accounting (marks)
By: dev on Tue, 29 August 2006 15:53
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
By: dev on Fri, 25 August 2006 11:47
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
By: dev on Mon, 28 August 2006 08:27
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: BC: resource beancounters (v2)
|
 |
|
Re: BC: resource beancounters (v2)
|
 |
|
Re: BC: resource beancounters (v2)
|
 |
|
Re: BC: resource beancounters (v2)
|
 |
|
Re: BC: resource beancounters (v2)
By: Alan Cox on Sat, 26 August 2006 16:16
|
 |
|
Re: BC: resource beancounters (v2)
|
 |
|
Re: Re: BC: resource beancounters (v2)
By: kir on Mon, 28 August 2006 17:40
|
 |
|
Re: Re: BC: resource beancounters (v2)
|
 |
|
Re: Re: BC: resource beancounters (v2)
By: Alan Cox on Tue, 29 August 2006 10:15
|
 |
|
Re: Re: BC: resource beancounters (v2)
|
 |
|
Re: Re: BC: resource beancounters (v2)
By: Alan Cox on Tue, 29 August 2006 18:46
|
 |
|
Re: Re: BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
By: dev on Tue, 29 August 2006 15:33
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
By: Alan Cox on Thu, 24 August 2006 10:38
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
By: Alan Cox on Fri, 25 August 2006 15:36
|
 |
|
Re: [PATCH] BC: resource beancounters (v2)
|
Goto Forum:
Current Time: Fri Jul 04 22:39:17 GMT 2025
Total time taken to generate the page: 0.03406 seconds
|