alistair23-linux/drivers/misc
Nadav Amit 6e4453b321 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>
2018-09-25 20:11:42 +02:00
..
altera-stapl
c2port
cardreader
cb710 cb710: Convert to new IDA API 2018-08-21 23:54:18 -04:00
cxl misc: Convert to using %pOFn instead of device_node.name 2018-09-14 15:25:57 +02:00
echo
eeprom Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-08-21 17:40:46 -07:00
genwqe genwqe: card_base: Use true and false for boolean values 2018-08-05 16:29:11 +02:00
ibmasm
lis3lv02d
lkdtm misc: lkdtm: fixed static variable initialization 2018-09-12 09:46:46 +02:00
mei mei: bus: need to unlink client before freeing 2018-09-12 09:14:24 +02:00
mic mm, oom: distinguish blockable mode for mmu notifiers 2018-08-22 10:52:44 -07:00
ocxl Merge branch 'akpm' (patches from Andrew) 2018-08-17 16:49:31 -07:00
sgi-gru misc: sgi-gru: fix fall-through annotations 2018-09-20 15:13:52 +02:00
sgi-xp misc: sgi-xp: remove meaningless null check before kfree 2018-09-14 15:36:20 +02:00
ti-st misc: ti-st: Fix memory leak in the error path of probe() 2018-08-02 10:35:04 +02:00
vmw_vmci
ad525x_dpot-i2c.c drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address 2018-09-14 15:36:20 +02:00
ad525x_dpot-spi.c drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address 2018-09-14 15:36:20 +02:00
ad525x_dpot.c drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address 2018-09-14 15:36:20 +02:00
ad525x_dpot.h
apds990x.c misc: apds990x: remove unused array ir_currents 2018-09-12 09:46:46 +02:00
apds9802als.c
aspeed-lpc-ctrl.c
aspeed-lpc-snoop.c drivers/misc: Aspeed LPC snoop output using misc chardev 2018-07-16 13:30:47 +02:00
atmel-ssc.c
atmel_tclib.c
bh1770glc.c misc: bh1770glc: remove unused array prox_curr_ma 2018-09-12 09:46:46 +02:00
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fsa9480.c
hmc6352.c misc: hmc6352: fix potential Spectre v1 2018-09-12 09:31:00 +02:00
hpilo.c
hpilo.h
ibmvmc.c misc: ibmvsm: Fix wrong assignment of return code 2018-09-12 09:31:00 +02:00
ibmvmc.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c
lattice-ecp3-config.c
Makefile
pch_phub.c
pci_endpoint_test.c pci_endpoint_test: Add 2 ioctl commands 2018-07-19 11:46:57 +01:00
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c misc: vexpress/syscfg: Use devm_ioremap_resource() to map memory 2018-07-16 13:32:08 +02:00
vmw_balloon.c vmw_balloon: rework the inflate and deflate loops 2018-09-25 20:11:42 +02:00