Toshi Kani
825f787bb4
resource: add release_mem_region_adjustable()
...
Add release_mem_region_adjustable(), which releases a requested region
from a currently busy memory resource. This interface adjusts the
matched memory resource accordingly even if the requested region does
not match exactly but still fits into.
This new interface is intended for memory hot-delete. During bootup,
memory resources are inserted from the boot descriptor table, such as
EFI Memory Table and e820. Each memory resource entry usually covers
the whole contigous memory range. Memory hot-delete request, on the
other hand, may target to a particular range of memory resource, and its
size can be much smaller than the whole contiguous memory. Since the
existing release interfaces like __release_region() require a requested
region to be exactly matched to a resource entry, they do not allow a
partial resource to be released.
This new interface is restrictive (i.e. release under certain
conditions), which is consistent with other release interfaces,
__release_region() and __release_resource(). Additional release
conditions, such as an overlapping region to a resource entry, can be
supported after they are confirmed as valid cases.
There is no change to the existing interfaces since their restriction is
valid for I/O resources.
[[email protected] : use GFP_ATOMIC under write_lock()]
[[email protected] : switch back to GFP_KERNEL, less buggily]
[[email protected] : remove unneeded and wrong kfree(), per Toshi]
Signed-off-by: Toshi Kani <[email protected] >
Reviewed-by : Yasuaki Ishimatsu <[email protected] >
Cc: David Rientjes <[email protected] >
Reviewed-by: Ram Pai <[email protected] >
Cc: T Makphaibulchoke <[email protected] >
Cc: Wen Congyang <[email protected] >
Cc: Tang Chen <[email protected] >
Cc: Jiang Liu <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2013-04-29 15:54:37 -07:00
..
debug
KGDB/KDB fixes and cleanups
2013-03-02 08:31:39 -08:00
events
events: Protect access via task_subsys_state_check()
2013-04-21 11:21:39 +02:00
gcov
irq
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2013-02-26 20:16:07 -08:00
power
Driver core patches for 3.9-rc1
2013-02-21 12:05:51 -08:00
sched
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-04-29 08:21:37 -07:00
time
clockevents: Don't allow dummy broadcast timers
2013-03-07 17:16:11 +01:00
trace
Revert "block: add missing block_bio_complete() tracepoint"
2013-04-18 09:00:26 -07:00
.gitignore
kernel/hz.bc: ignore.
2013-04-22 07:09:06 -07:00
acct.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2013-02-26 20:16:07 -08:00
async.c
Merge branch 'for-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
2013-02-19 22:01:33 -08:00
audit.c
audit: don't check if kauditd is valid every time
2013-04-29 15:54:26 -07:00
audit.h
audit: remove unnecessary #if CONFIG_AUDIT
2013-04-29 15:54:26 -07:00
audit_tree.c
kernel/audit_tree.c: tree will leak memory when failure occurs in audit_trim_trees()
2013-04-29 15:54:26 -07:00
audit_watch.c
auditfilter.c
kernel/auditfilter.c: tree and watch will memory leak when failure occurs
2013-04-29 15:54:26 -07:00
auditsc.c
kernel/auditsc.c: use kzalloc instead of kmalloc+memset
2013-04-29 15:54:26 -07:00
backtracetest.c
bounds.c
capability.c
Add file_ns_capable() helper function for open-time capability checking
2013-04-14 10:06:31 -07:00
cgroup.c
cgroup: remove css_get_next
2013-04-29 15:54:33 -07:00
cgroup_freezer.c
compat.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
2013-02-23 18:50:11 -08:00
configs.c
context_tracking.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-02-19 18:19:48 -08:00
cpu.c
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-02-19 19:04:55 -08:00
cpu_pm.c
cpuset.c
kernel/cpuset.c: use register_hotmemory_notifier()
2013-04-29 15:54:36 -07:00
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c
Revert "lockdep: check that no locks held at freeze time"
2013-03-31 11:38:33 -07:00
extable.c
fork.c
userns: Don't allow CLONE_NEWUSER | CLONE_FS
2013-03-13 15:00:20 -07:00
freezer.c
futex.c
futex: fix kernel-doc notation and spello
2013-03-12 20:42:10 -07:00
futex_compat.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
2013-02-23 18:50:11 -08:00
groups.c
hrtimer.c
hrtimer: Don't reinitialize a cpu_base lock on CPU_UP
2013-03-26 21:34:57 +01:00
hung_task.c
irq_work.c
Merge branch 'nohz/printk-v8' into irq/core
2013-02-05 00:48:46 +01:00
itimer.c
jump_label.c
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kexec.c
kexec, vmalloc: export additional vmalloc layer information
2013-04-29 15:54:34 -07:00
kmod.c
kprobes.c
kprobes: Fix a double lock bug of kprobe_mutex
2013-04-18 08:58:38 -07:00
ksysfs.c
kthread.c
kthread: kill task_get_live_kthread()
2013-04-29 15:54:25 -07:00
latencytop.c
lglock.c
lockdep.c
lockdep: Consolidate bug messages into a single print_lockdep_off() function
2013-04-26 08:37:22 +02:00
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
Makefile
Merge branch 'akpm' (final batch from Andrew)
2013-02-27 20:58:09 -08:00
modsign_certificate.S
modsign_pubkey.c
module-internal.h
module.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2013-02-26 20:16:07 -08:00
module_signing.c
mutex-debug.c
mutex-debug.h
mutex.c
mutex: Back out architecture specific check for negative mutex count
2013-04-19 09:33:36 +02:00
mutex.h
notifier.c
nsproxy.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2013-02-26 20:16:07 -08:00
padata.c
panic.c
params.c
pid.c
hlist: drop the node parameter from iterators
2013-02-27 19:10:24 -08:00
pid_namespace.c
pid: Handle the exit of a multi-threaded init.
2013-03-26 03:41:23 -07:00
posix-cpu-timers.c
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-02-19 19:05:45 -08:00
posix-timers.c
posix-timers: convert to idr_alloc()
2013-02-27 19:10:19 -08:00
printk.c
printk: Provide a wake_up_klogd() off-case
2013-03-22 16:41:20 -07:00
profile.c
ptrace.c
uprobes: Add exports for module use
2013-02-08 17:47:13 +01:00
range.c
rcu.h
rcupdate.c
rcutiny.c
rcutiny_plugin.h
rcutorture.c
rcu: Allow rcutorture to be built at low optimization levels
2013-02-04 12:18:20 -08:00
rcutree.c
rcutree.h
rcutree_plugin.h
rcutree_trace.c
relay.c
new helper: file_inode(file)
2013-02-22 23:31:31 -05:00
res_counter.c
resource.c
resource: add release_mem_region_adjustable()
2013-04-29 15:54:37 -07:00
rtmutex-debug.c
sched/rt: Move rt specific bits into new header file
2013-02-07 20:51:08 +01:00
rtmutex-debug.h
rtmutex-tester.c
locking/rtmutex/tester: Set correct permissions on sysfs files
2013-04-10 14:48:37 +02:00
rtmutex.c
sched/rt: Move rt specific bits into new header file
2013-02-07 20:51:08 +01:00
rtmutex.h
rtmutex_common.h
rwsem.c
seccomp.c
semaphore.c
signal.c
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
2013-04-17 16:10:45 -07:00
smp.c
smp: make smp_call_function_many() use logic similar to smp_call_function_single()
2013-02-21 17:22:20 -08:00
smpboot.c
kthread: Prevent unpark race which puts threads on the wrong cpu
2013-04-12 14:18:43 +02:00
smpboot.h
softirq.c
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-03-05 18:10:04 -08:00
spinlock.c
srcu.c
srcu: use ACCESS_ONCE() to access sp->completed in srcu_read_lock()
2013-02-07 15:19:36 -08:00
stacktrace.c
stop_machine.c
stop_machine: Mark per cpu stopper enabled early
2013-02-26 22:25:17 +01:00
sys.c
PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
2013-04-08 22:10:40 +02:00
sys_ni.c
sysctl.c
mm: replace hardcoded 3% with admin_reserve_pages knob
2013-04-29 15:54:36 -07:00
sysctl_binary.c
sysctl: fix null checking in bin_dn_node_address()
2013-02-27 19:10:21 -08:00
task_work.c
taskstats.c
test_kprobes.c
time.c
time: don't inline EXPORT_SYMBOL functions
2013-02-21 17:22:19 -08:00
timeconst.bc
kernel: Replace timeconst.pl with a bc script
2013-02-16 23:17:25 +01:00
timer.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-02-19 18:19:48 -08:00
tracepoint.c
hlist: drop the node parameter from iterators
2013-02-27 19:10:24 -08:00
tsacct.c
uid16.c
up.c
user-return-notifier.c
hlist: drop the node parameter from iterators
2013-02-27 19:10:24 -08:00
user.c
userns: Restrict when proc and sysfs can be mounted
2013-03-27 07:50:08 -07:00
user_namespace.c
userns: Changing any namespace id mappings should require privileges
2013-04-14 18:11:32 -07:00
utsname.c
kernel/utsname.c: fix wrong comment about clone_uts_ns()
2013-02-27 19:10:22 -08:00
utsname_sysctl.c
kernel/utsname_sysctl.c: put get/get_uts() into CONFIG_PROC_SYSCTL code block
2013-02-27 19:10:22 -08:00
wait.c
watchdog.c
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2013-02-22 19:25:09 -08:00
workqueue.c
Merge branch 'for-3.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
2013-03-18 18:47:07 -07:00
workqueue_internal.h
workqueue: rename cpu_workqueue to pool_workqueue
2013-02-13 19:29:12 -08:00