linux_old1/drivers
Dan Williams 5c2c2587b1 mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup
get_dev_page() enables paths like get_user_pages() to pin a dynamically
mapped pfn-range (devm_memremap_pages()) while the resulting struct page
objects are in use.  Unlike get_page() it may fail if the device is, or
is in the process of being, disabled.  While the initial lookup of the
range may be an expensive list walk, the result is cached to speed up
subsequent lookups which are likely to be in the same mapped range.

devm_memremap_pages() now requires a reference counter to be specified
at init time.  For pmem this means moving request_queue allocation into
pmem_alloc() so the existing queue usage counter can track "device
pages".

ZONE_DEVICE pages always have an elevated count and will never be on an
lru reclaim list.  That space in 'struct page' can be redirected for
other uses, but for safety introduce a poison value that will always
trip __list_add() to assert.  This allows half of the struct list_head
storage to be reclaimed with some assurance to back up the assumption
that the page count never goes to zero and a list_add() is never
attempted.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-15 17:56:32 -08:00
..
accessibility
acpi libnvdimm for 4.5 2016-01-13 19:15:14 -08:00
amba
android
ata Merge branch 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2016-01-11 19:33:59 -08:00
atm atm: solos-pci: use to_pci_dev() 2015-12-29 15:32:24 -05:00
auxdisplay
base mm: skip memory block registration for ZONE_DEVICE 2016-01-15 17:56:32 -08:00
bcma bcma: use module_init for the main part of bus initialization 2015-12-31 10:17:05 +02:00
block mm, dax, pmem: introduce pfn_t 2016-01-15 17:56:32 -08:00
bluetooth Bluetooth: btmrvl: don't send data to firmware while processing suspend 2016-01-06 16:37:14 +01:00
bus bus: sunxi-rsb: Fix peripheral IC mapping runtime address 2015-12-22 11:42:30 -08:00
cdrom cdrom: don't open-code memdup_user() 2016-01-06 08:25:24 -05:00
char Some minor changes that have been in linux-next for a while. 2016-01-13 11:19:24 -08:00
clk ARM: SoC fixes for 4.4-rc 2015-12-12 16:43:44 -08:00
clocksource Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent 2016-01-12 11:01:12 +01:00
connector connector: bump skb->users before callback invocation 2016-01-04 21:46:45 -05:00
cpufreq powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
cpuidle powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
crypto powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
dca
devfreq
dio
dma dmaengine updates for 4.5-rc1 2016-01-13 10:59:52 -08:00
dma-buf
edac EDAC, i5100: Use to_delayed_work() 2016-01-01 18:31:34 +01:00
eisa
extcon extcon: add Maxim MAX3355 driver 2015-12-21 11:44:00 +09:00
firewire
firmware Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-01-14 17:04:19 -08:00
fmc
fpga
gpio - New Device Support 2016-01-14 10:53:15 -08:00
gpu mm, dax, gpu: convert vm_insert_mixed to pfn_t 2016-01-15 17:56:32 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2016-01-14 16:20:42 -08:00
hsi HSI: omap_ssi_port: fix handling of_get_named_gpio result 2016-01-07 16:07:54 +01:00
hv char/misc patches for 4.5-rc1 2016-01-13 10:23:36 -08:00
hwmon hwmon: (nct6683) Add basic support for NCT6683 on Mitac boards 2016-01-09 07:31:58 -08:00
hwspinlock
hwtracing coresight: Fix a typo in Kconfig 2015-12-21 13:31:31 -08:00
i2c Merge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-01-14 11:25:37 -08:00
ide
idle
iio Third set of new stuff for IIO in the 4.5 cycle. 2015-12-26 17:05:25 -08:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-01-14 17:04:19 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-01-13 11:14:05 -08:00
iommu Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-11 16:26:03 -08:00
ipack
irqchip Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent 2016-01-12 11:01:12 +01:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
leds leds: add HAS_IOMEM dependency to LEDS_BCM6328/LEDS_BCM6358 2016-01-04 09:57:41 +01:00
lguest lguest: Map switcher text R/O 2016-01-12 12:17:28 +01:00
lightnvm lightnvm: wrong offset in bad blk lun calculation 2015-12-29 08:28:32 -07:00
macintosh
mailbox mailbox: constify mbox_chan_ops structure 2015-11-30 21:12:05 +05:30
mcb
md md updates for 4.5 2016-01-15 12:28:00 -08:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-01-14 17:04:19 -08:00
memory fsl-ifc: add missing include on ARM64 2015-12-16 00:16:58 +01:00
memstick
message
mfd - New Device Support 2016-01-14 10:53:15 -08:00
misc powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
mmc mmc: dw_mmc: remove the unused quirks 2016-01-05 18:04:58 +01:00
mtd MTD updates for v4.5: 2016-01-13 11:25:54 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-15 13:33:12 -08:00
nfc nfc: pn544: Remove i2c client gpio irq configuration 2015-12-29 19:06:23 +01:00
ntb
nubus
nvdimm mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup 2016-01-15 17:56:32 -08:00
nvme NVMe: IO ending fixes on surprise removal 2015-12-22 10:12:04 -07:00
nvmem
of DeviceTree updates for 4.5: 2016-01-14 11:13:28 -08:00
oprofile
parisc parisc iommu: fix panic due to trying to allocate too large region 2015-12-12 16:07:25 +01:00
parport parport: avoid assignment in if 2016-01-03 16:32:59 -08:00
pci Power management and ACPI updates for v4.5-rc1 2016-01-12 20:25:09 -08:00
pcmcia
perf
phy phy: for 4.5 2015-12-26 17:01:18 -08:00
pinctrl This is the bulk of pin control patches for the v4.5 2016-01-11 20:05:39 -08:00
platform thinkpad_acpi: Use acpi_video_handles_brightness_key_presses() 2016-01-01 03:14:51 +01:00
pnp PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching 2016-01-04 22:12:42 +01:00
power power: bq27xxx_battery: Fix bq27541 AveragePower register address 2016-01-14 01:03:18 +01:00
powercap Merge branch 'powercap' 2016-01-12 01:12:40 +01:00
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: Update for v4.5 2016-01-15 12:14:47 -08:00
remoteproc
reset
rpmsg
rtc powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
s390 mm, dax, pmem: introduce pfn_t 2016-01-15 17:56:32 -08:00
sbus convert a bunch of open-coded instances of memdup_user_nul() 2016-01-04 10:26:58 -05:00
scsi SCSI misc on 20160113 2016-01-13 19:37:36 -08:00
sfi
sh
sn
soc powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
spi powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
spmi
ssb ssb: pick SoC invariants code from MIPS BCM47xx arch 2015-12-16 16:36:25 +02:00
staging kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
target
tc
thermal x86/platform/iosf_mbi: Remove duplicate definitions 2015-12-09 01:18:34 +01:00
thunderbolt
tty powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
uio
usb powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
uwb uwb: uwbd() is not freezable kthread 2015-12-01 14:26:33 -08:00
vfio vfio/iommu_type1: make use of info.flags 2016-01-04 12:55:44 -07:00
vhost Revert "Merge branch 'vsock-virtio'" 2015-12-08 21:55:49 -05:00
video - Fix-ups 2016-01-14 10:34:33 -08:00
virt
virtio virtio_ring: shadow available ring flags & index 2015-12-07 17:28:11 +02:00
vlynq
vme
w1
watchdog
xen xen/gntdev: add ioctl for grant copy 2016-01-07 13:21:53 +00:00
zorro
Kconfig
Makefile power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them 2015-12-08 04:26:05 +01:00