x86, bts, mm: clean up buffer allocation
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 24 Apr 2009 07:51:43 +0000 (09:51 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 24 Apr 2009 08:18:52 +0000 (10:18 +0200)
commit1cb81b143fa8f0e4629f10690862e2e52ca792ff
tree667b9677f8ad1211ca3d094bedabe47a3d4f5ba9
parent7e0bfad24d85de7cf2202a7b0ce51de11a077b21
x86, bts, mm: clean up buffer allocation

The current mm interface is asymetric. One function allocates a locked
buffer, another function only refunds the memory.

Change this to have two functions for accounting and refunding locked
memory, respectively; and do the actual buffer allocation in ptrace.

[ Impact: refactor BTS buffer allocation code ]

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090424095143.A30265@sedona.ch.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ptrace.c
include/linux/mm.h
mm/mlock.c