aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/kgdbts.c
diff options
context:
space:
mode:
authorNadav Amit <namit@vmware.com>2018-09-20 10:30:18 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-25 20:11:42 +0200
commit6e4453b3211d144a152d88f634a691adf651cfc2 (patch)
tree2e0873a10813cae0eab95daf837715b47e7cf4d9 /drivers/misc/kgdbts.c
parentvmw_balloon: stats rework (diff)
downloadlinux-dev-6e4453b3211d144a152d88f634a691adf651cfc2.tar.xz
linux-dev-6e4453b3211d144a152d88f634a691adf651cfc2.zip
vmw_balloon: rework the inflate and deflate loops
In preparation for supporting compaction and OOM notification, this patch reworks the inflate/deflate loops. The main idea is to separate the allocation, communication with the hypervisor, and the handling of errors from each other. Doing will allow us to perform concurrent inflation and deflation, excluding the actual communication with the hypervisor. To do so, we need to get rid of the remaining global state that is kept in the balloon struct, specifically the refuse_list. When the VM communicates with the hypervisor, it does not free or put back pages to the balloon list and instead only moves the pages whose status indicated failure into a refuse_list on the stack. Once the operation completes, the inflation or deflation functions handle the list appropriately. As we do that, we can consolidate the communication with the hypervisor for both the lock and unlock operations into a single function. We also reuse the deflation function for popping the balloon. As a preparation for preventing races, we hold a spinlock when the communication actually takes place, and use atomic operations for updating the balloon size. The balloon page list is still racy and will be handled in the next patch. 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/kgdbts.c')
0 files changed, 0 insertions, 0 deletions