linux/drivers/net
Andres Lagar-Cavilla c571898ffc xen/gndev: Xen backend support for paged out grant targets V4.
Since Xen-4.2, hvm domains may have portions of their memory paged out. When a
foreign domain (such as dom0) attempts to map these frames, the map will
initially fail. The hypervisor returns a suitable errno, and kicks an
asynchronous page-in operation carried out by a helper. The foreign domain is
expected to retry the mapping operation until it eventually succeeds. The
foreign domain is not put to sleep because itself could be the one running the
pager assist (typical scenario for dom0).

This patch adds support for this mechanism for backend drivers using grant
mapping and copying operations. Specifically, this covers the blkback and
gntdev drivers (which map foreign grants), and the netback driver (which copies
foreign grants).

* Add a retry method for grants that fail with GNTST_eagain (i.e. because the
  target foreign frame is paged out).
* Insert hooks with appropriate wrappers in the aforementioned drivers.

The retry loop is only invoked if the grant operation status is GNTST_eagain.
It guarantees to leave a new status code different from GNTST_eagain. Any other
status code results in identical code execution as before.

The retry loop performs 256 attempts with increasing time intervals through a
32 second period. It uses msleep to yield while waiting for the next retry.

V2 after feedback from David Vrabel:
* Explicit MAX_DELAY instead of wrap-around delay into zero
* Abstract GNTST_eagain check into core grant table code for netback module.

V3 after feedback from Ian Campbell:
* Add placeholder in array of grant table error descriptions for unrelated
  error code we jump over.
* Eliminate single map and retry macro in favor of a generic batch flavor.
* Some renaming.
* Bury most implementation in grant_table.c, cleaner interface.

V4 rebased on top of sync of Xen grant table interface headers.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[v5: Fixed whitespace issues]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-09-21 09:23:51 -04:00
..
appletalk net: Use PTR_RET rather than if(IS_ERR(.. [1] 2012-08-06 13:30:02 -07:00
arcnet arcnet: rimi: Fix device name in debug output 2012-04-17 22:22:43 -04:00
bonding netpoll: check netpoll tx status on the right device 2012-08-14 14:33:32 -07:00
caif caif: fix NULL pointer check 2012-07-24 13:54:16 -07:00
can can: sja1000_platform: fix wrong flag IRQF_SHARED for interrupt sharing 2012-08-24 10:54:05 +02:00
cris cris: fix eth_v10.c build error 2012-08-03 20:32:31 -07:00
dsa
ethernet net: ethernet: fix kernel OOPS when remove davinci_mdio module 2012-08-31 16:35:07 -04:00
fddi fddi: 64 bit bug in smt_add_para() 2012-09-01 22:44:13 -04:00
hamradio drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
hippi hippi: fix printk format in rrunner.c 2012-04-16 23:48:38 -04:00
hyperv hyperv: Move wait completion msg code into rndis_filter_halt_device() 2012-08-03 16:51:11 -07:00
irda drivers/net/irda: fix error return code 2012-08-20 02:33:21 -07:00
phy netdev/phy: skip disabled mdio-mux nodes 2012-08-20 02:16:00 -07:00
plip
ppp pptp: lookup route with the proper net namespace 2012-08-08 15:57:10 -07:00
slip drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
team netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup() 2012-08-14 14:33:30 -07:00
usb net: qmi_wwan: add several new Gobi devices 2012-09-01 22:49:34 -04:00
vmxnet3 vmxnet3: Fix race between dev_open() and register_netdev() 2012-08-15 15:10:42 -07:00
wan drivers/net/wan/dscc4.c: fix error return code 2012-08-20 02:33:21 -07:00
wimax drivers/net/wimax/i2400m/fw.c: fix error return code 2012-08-20 02:33:21 -07:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-08-24 11:16:58 -04:00
xen-netback xen/gndev: Xen backend support for paged out grant targets V4. 2012-09-21 09:23:51 -04:00
dummy.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
eql.c
ifb.c
Kconfig tokenring: delete all remaining driver support 2012-05-15 20:23:16 -04:00
LICENSE.SRC
loopback.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-16 22:17:37 -04:00
macvtap.c macvtap: rcu_dereference outside read-lock section 2012-08-12 13:40:48 -07:00
Makefile tokenring: delete all remaining driver support 2012-05-15 20:23:16 -04:00
mdio.c
mii.c
netconsole.c netconsole: remove a redundant netconsole_target_put() 2012-08-20 02:59:49 -07:00
rionet.c
sb1000.c
Space.c drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
sungem_phy.c
tun.c tun: don't zeroize sock->file on detach 2012-08-09 16:16:14 -07:00
veth.c
virtio_net.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
xen-netfront.c xen-netfront: use __pskb_pull_tail to ensure linear area is big enough on RX 2012-08-30 12:24:04 -04:00