linux-stable-rt/mm
Steven Rostedt 3eefae994d ftrace: limit trace entries
Currently there is no protection from the root user to use up all of
memory for trace buffers. If the root user allocates too many entries,
the OOM killer might start kill off all tasks.

This patch adds an algorith to check the following condition:

 pages_requested > (freeable_memory + current_trace_buffer_pages) / 4

If the above is met then the allocation fails. The above prevents more
than 1/4th of freeable memory from being used by trace buffers.

To determine the freeable_memory, I made determine_dirtyable_memory in
mm/page-writeback.c global.

Special thanks goes to Peter Zijlstra for suggesting the above calculation.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-23 22:05:14 +02:00
..
Kconfig
Makefile
allocpercpu.c
backing-dev.c mm: bdi: fix race in bdi_class device creation 2008-05-20 13:31:53 -07:00
bootmem.c
bounce.c
dmapool.c
fadvise.c
filemap.c mm: fix infinite loop in filemap_fault 2008-05-14 19:11:13 -07:00
filemap_xip.c
fremap.c
highmem.c
hugetlb.c
internal.h
maccess.c
madvise.c
memcontrol.c memcg: simple stats for memory resource controller 2008-05-01 08:04:02 -07:00
memory.c fix SMP data race in pagetable setup vs walking 2008-05-14 10:05:18 -07:00
memory_hotplug.c memory_hotplug: always initialize pageblock bitmap 2008-05-14 19:11:15 -07:00
mempolicy.c
mempool.c
migrate.c mm: fix warning on memory offline 2008-04-30 08:29:55 -07:00
mincore.c
mlock.c
mmap.c
mmzone.c
mprotect.c mprotect: prevent alteration of the PAT bits 2008-05-14 19:11:15 -07:00
mremap.c
msync.c
nommu.c
oom_kill.c
page-writeback.c ftrace: limit trace entries 2008-05-23 22:05:14 +02:00
page_alloc.c memory_hotplug: always initialize pageblock bitmap 2008-05-14 19:11:15 -07:00
page_io.c
page_isolation.c
pagewalk.c
pdflush.c mm/pdflush.c: merge the same code in two path 2008-05-13 08:02:24 -07:00
prio_tree.c
quicklist.c
readahead.c
rmap.c
shmem.c mm: bdi: add separate writeback accounting capability 2008-04-30 08:29:50 -07:00
shmem_acl.c
slab.c mm: remove remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
slob.c
slub.c slub: fix atomic usage in any_slab_objects() 2008-05-08 10:46:56 -07:00
sparse-vmemmap.c
sparse.c revert "memory hotplug: allocate usemap on the section with pgdat" 2008-04-30 08:29:55 -07:00
swap.c
swap_state.c mm: bdi: add separate writeback accounting capability 2008-04-30 08:29:50 -07:00
swapfile.c
thrash.c
tiny-shmem.c
truncate.c
util.c
vmalloc.c docbook: fix vmalloc missing parameter notation 2008-05-01 08:03:59 -07:00
vmscan.c mm: remove remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
vmstat.c make vmstat cpu-unplug safe 2008-05-13 08:02:23 -07:00