aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorToshi Kani <[email protected]>2013-04-29 15:08:19 -0700
committerLinus Torvalds <[email protected]>2013-04-29 15:54:37 -0700
commit825f787bb49676083b97c1de1f8f2f8f26b5c908 (patch)
treef0cda2ad649b442fffc064dc625aa85e2b005ae2 /net/lapb/lapb_iface.c
parentae8e3a915aef5af5ace5936c56f05f0b1502ded1 (diff)
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]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions