kernel-hacking-2024-linux-s.../drivers/net
Nick Piggin e286781d5f mm: speculative page references
If we can be sure that elevating the page_count on a pagecache page will
pin it, we can speculatively run this operation, and subsequently check to
see if we hit the right page rather than relying on holding a lock or
otherwise pinning a reference to the page.

This can be done if get_page/put_page behaves consistently throughout the
whole tree (ie.  if we "get" the page after it has been used for something
else, we must be able to free it with a put_page).

Actually, there is a period where the count behaves differently: when the
page is free or if it is a constituent page of a compound page.  We need
an atomic_inc_not_zero operation to ensure we don't try to grab the page
in either case.

This patch introduces the core locking protocol to the pagecache (ie.
adds page_cache_get_speculative, and tweaks some update-side code to make
it work).

Thanks to Hugh for pointing out an improvement to the algorithm setting
page_count to zero when we have control of all references, in order to
hold off speculative getters.

[kamezawa.hiroyu@jp.fujitsu.com: fix migration_entry_wait()]
[hugh@veritas.com: fix add_to_page_cache]
[akpm@linux-foundation.org: repair a comment]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Reviewed-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26 12:00:06 -07:00
..
appletalk
arcnet
arm dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
atl1e [netdrvr] atl1d: fix !CONFIG_PM build 2008-07-22 21:17:38 -04:00
atlx atl1: Do not wake queue before queue has been started. 2008-07-21 08:28:37 -07:00
bonding netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. 2008-07-22 14:16:42 -07:00
can
chelsio
cris
cxgb3 dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
e1000 e1000: make ioport free 2008-07-22 19:39:14 -04:00
e1000e dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
ehea
fs_enet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-22 19:09:51 -07:00
hamradio netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. 2008-07-22 14:16:42 -07:00
ibm_newemac Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
igb net: igb_main.c fix sparse integer as NULL pointer warning 2008-07-22 17:54:12 -04:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
ixgb netdrv intel: always enable VLAN filtering except in promiscous mode 2008-07-16 20:16:14 -07:00
ixgbe ixgbe: remove device ID for unsupported device 2008-07-22 19:31:00 -04:00
ixp2000
mlx4 dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
myri10ge myri10ge: use ioremap_wc 2008-07-22 16:09:13 -04:00
netxen netxen: Needs to include linux/vmalloc.h 2008-07-22 18:29:10 -07:00
pcmcia
phy net/phy: Fix 88e1111 copper/fiber selection in RGMII mode 2008-07-22 17:59:12 -04:00
sfc dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
skfp
tokenring Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
tulip de4x5: Remove developer debug feature about set/clear promisc 2008-07-22 16:09:09 -04:00
usb rndis_host: support WM6 devices as modems 2008-07-22 19:45:49 -04:00
wan device create: net: convert device_create to device_create_drvdata 2008-07-21 21:54:44 -07:00
wireless dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
3c59x.c 3c59x: handle pci_name() being const 2008-07-21 21:55:03 -07:00
3c501.c
3c501.h
3c503.c
3c503.h
3c505.c
3c505.h
3c507.c
3c509.c
3c515.c
3c523.c
3c523.h
3c527.c
3c527.h
7990.c
7990.h
8139cp.c
8139too.c 8139too: Fall back to PIO when MMIO fails. 2008-07-22 17:59:30 -04:00
8390.c
8390.h
8390p.c
82596.c
a2065.c
a2065.h
ac3200.c
acenic.c
acenic.h
acenic_firmware.h
amd8111e.c
amd8111e.h
apne.c
ariadne.c ariadne: use netstats in net_device structure 2008-07-20 17:24:38 -07:00
ariadne.h
at1700.c
atarilance.c
atp.c
atp.h
au1000_eth.c netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 2008-07-22 15:41:24 -07:00
au1000_eth.h
ax88796.c
b44.c
b44.h
bfin_mac.c netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 2008-07-22 15:41:24 -07:00
bfin_mac.h
bmac.c
bmac.h
bnx2.c bnx2: Update version to 1.7.9. 2008-07-18 17:58:57 -07:00
bnx2.h bnx2: Add TX multiqueue support. 2008-07-18 17:55:11 -07:00
bnx2_fw.h
bnx2_fw2.h bnx2: Update TPAT firmware 2008-07-18 17:54:17 -07:00
bnx2x.h
bnx2x_fw_defs.h
bnx2x_hsi.h
bnx2x_init.h
bnx2x_init_values.h
bnx2x_link.c
bnx2x_link.h
bnx2x_main.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
bnx2x_reg.h
bsd_comp.c
cassini.c mm: speculative page references 2008-07-26 12:00:06 -07:00
cassini.h
cpmac.c netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 2008-07-22 15:41:24 -07:00
cs89x0.c
cs89x0.h
de600.c
de600.h
de620.c
de620.h
declance.c
defxx.c
defxx.h
depca.c
depca.h
dl2k.c
dl2k.h
dm9000.c DM9000: Remove magic numbers 2008-07-22 17:54:07 -04:00
dm9000.h
dummy.c
e100.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
e2100.c
eepro.c
eepro100.c
eexpress.c
eexpress.h
enc28j60.c
enc28j60_hw.h
epic100.c
eql.c
es3210.c
eth16i.c
ewrk3.c
ewrk3.h
fealnx.c
fec.c m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSIC 2008-07-23 15:11:29 +10:00
fec.h
fec_mpc52xx.c netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 2008-07-22 15:41:24 -07:00
fec_mpc52xx.h
fec_mpc52xx_phy.c
forcedeth.c netdev: Add netdev->addr_list_lock protection. 2008-07-15 00:13:44 -07:00
gianfar.c Merge commit 'origin/master' 2008-07-22 17:12:37 +10:00
gianfar.h Merge commit 'origin/master' 2008-07-22 17:12:37 +10:00
gianfar_ethtool.c gianfar: Add magic packet and suspend/resume support. 2008-07-16 17:57:47 -05:00
gianfar_mii.c
gianfar_mii.h
gianfar_sysfs.c
hamachi.c
hp-plus.c net 8390p: fix interface usage 2008-07-22 17:50:44 -04:00
hp.c net 8390p: fix interface usage 2008-07-22 17:50:44 -04:00
hp100.c
hp100.h
hplance.c
hplance.h
hydra.c
ibmlana.c
ibmlana.h
ibmveth.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
ibmveth.h ibmveth: enable driver for CMO 2008-07-25 15:44:44 +10:00
ifb.c pkt_sched: Kill netdev_queue lock. 2008-07-17 19:21:30 -07:00
ioc3-eth.c
ipg.c
ipg.h
isa-skeleton.c
iseries_veth.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
jazzsonic.c
Kconfig e1000: delete non NAPI code from the driver 2008-07-22 19:39:11 -04:00
korina.c
lance.c
lasi_82596.c
lib8390.c
lib82596.c
LICENSE.SRC
lne390.c
loopback.c netdev: netdev_priv() can now be sane again. 2008-07-17 19:21:09 -07:00
lp486e.c
mac89x0.c
mac8390.c
macb.c netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 2008-07-22 15:41:24 -07:00
macb.h
mace.c
mace.h
macmace.c
macsonic.c
macvlan.c netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. 2008-07-22 14:16:42 -07:00
Makefile atl1e: Atheros L1E Gigabit Ethernet driver 2008-07-22 19:31:04 -04:00
meth.c Fix typo in meth driver 2008-07-22 19:34:21 -04:00
meth.h
mii.c
mipsnet.c
mv643xx_eth.c mv643xx_eth: fix NETPOLL build 2008-07-22 19:56:37 -04:00
mvme147.c
myri_code.h
myri_sbus.c
myri_sbus.h
natsemi.c
ne-h8300.c
ne.c net 8390p: fix interface usage 2008-07-22 17:50:44 -04:00
ne2.c net 8390p: fix interface usage 2008-07-22 17:50:44 -04:00
ne2k-pci.c
ne3210.c
netconsole.c configfs: Allow ->make_item() and ->make_group() to return detailed errors. 2008-07-17 15:21:29 -07:00
netx-eth.c
ni52.c
ni52.h
ni65.c
ni65.h
ni5010.c
ni5010.h
niu.c niu: Add TX multiqueue support. 2008-07-17 19:21:17 -07:00
niu.h
ns83820.c
pasemi_mac.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
pasemi_mac.h
pasemi_mac_ethtool.c
pci-skeleton.c
pcnet32.c
plip.c
ppp_async.c tty: Ldisc revamp 2008-07-20 17:12:34 -07:00
ppp_deflate.c
ppp_generic.c device create: net: convert device_create to device_create_drvdata 2008-07-21 21:54:44 -07:00
ppp_mppe.c
ppp_mppe.h
ppp_synctty.c tty: Ldisc revamp 2008-07-20 17:12:34 -07:00
pppoe.c
pppol2tp.c
pppox.c
ps3_gelic_net.c
ps3_gelic_net.h
ps3_gelic_wireless.c
ps3_gelic_wireless.h
qla3xxx.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
qla3xxx.h
r6040.c r6040: rework init_one error handling 2008-07-22 20:00:01 -04:00
r8169.c r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06 2008-07-20 19:49:30 +02:00
rionet.c
rrunner.c
rrunner.h
s2io-regs.h
s2io.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
s2io.h
sb1000.c
sb1250-mac.c
sc92031.c
seeq8005.c
seeq8005.h
sgiseeq.c
sgiseeq.h
sh_eth.c netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 2008-07-22 15:41:24 -07:00
sh_eth.h
sis190.c
sis900.c
sis900.h
skge.c
skge.h
sky2.c sky2: don't stop queue on shutdown 2008-07-22 21:53:40 -07:00
sky2.h
slhc.c
slip.c tty: Ldisc revamp 2008-07-20 17:12:34 -07:00
slip.h
smc-mca.c
smc-ultra.c
smc-ultra32.c
smc91x.c
smc91x.h
smc911x.c
smc911x.h
smc9194.c
smc9194.h
sni_82596.c
sonic.c
sonic.h
Space.c
spider_net.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
spider_net.h
spider_net_ethtool.c
starfire.c
starfire_firmware.h
starfire_firmware.pl
stnic.c
sun3_82586.c
sun3_82586.h
sun3lance.c
sunbmac.c
sunbmac.h
sundance.c
sungem.c
sungem.h
sungem_phy.c
sungem_phy.h
sunhme.c sunhme: Remove stop/wake TX queue calls in set-multicast-list handler. 2008-07-21 08:34:49 -07:00
sunhme.h
sunlance.c
sunqe.c
sunqe.h
sunvnet.c
sunvnet.h
tc35815.c dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
tehuti.c
tehuti.h
tehuti_fw.h
tg3.c
tg3.h
tlan.c
tlan.h
tsi108_eth.c
tsi108_eth.h
tun.c net: tun.c fix cast 2008-07-22 17:54:17 -04:00
typhoon-firmware.h
typhoon.c
typhoon.h
ucc_geth.c ucc_geth: do not touch net queue in adjust_link phylib callback 2008-07-21 08:30:36 -07:00
ucc_geth.h
ucc_geth_ethtool.c
ucc_geth_mii.c
ucc_geth_mii.h
veth.c
via-rhine.c
via-velocity.c
via-velocity.h
virtio_net.c virtio: Recycle unused recv buffer pages for large skbs in net driver 2008-07-25 12:06:02 +10:00
wd.c
xen-netfront.c xen-netfront: fix xennet_release_tx_bufs() 2008-07-16 10:55:36 +02:00
yellowfin.c
znet.c
zorro8390.c