aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/vexpress-syscfg.c
diff options
context:
space:
mode:
authorNadav Amit <namit@vmware.com>2018-09-20 10:30:12 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-25 20:11:42 +0200
commitdf8d0d42afe853bb1e15e7543ee710b241bb3b35 (patch)
tree499b26adbd91ac374c0d941f4332aa0867b4eb88 /drivers/misc/vexpress-syscfg.c
parentvmw_balloon: remove sleeping allocations (diff)
downloadlinux-dev-df8d0d42afe853bb1e15e7543ee710b241bb3b35.tar.xz
linux-dev-df8d0d42afe853bb1e15e7543ee710b241bb3b35.zip
vmw_balloon: change batch/single lock abstractions
The current abstractions for batch vs single operations seem suboptimal and complicate the implementation of additional features (OOM, compaction). The immediate problem of the current abstractions is that they cause differences in how operations are handled when batching is on or off. For example, the refused_alloc counter is not updated when batching is on. These discrepancies are caused by code redundancies. Instead, this patch presents three type of operations, according to whether batching is on or off: (1) add page, (2) communication with the hypervisor and (3) retrieving the status of a page. To avoid the overhead of virtual functions, and since we do not expect additional interfaces for communication with the hypervisor, we use static keys instead of virtual functions. Finally, while we are at it, change vmballoon_init_batching() to return int instead of bool, to be consistent in the return type and avoid potential coding errors. Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com> Signed-off-by: Nadav Amit <namit@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/vexpress-syscfg.c')
0 files changed, 0 insertions, 0 deletions