OpenCloudOS-Kernel/Documentation
John Hubbard eaf4d22a9e docs: mm/gup: pin_user_pages.rst: add a "case 5"
Patch series "vhost, docs: convert to pin_user_pages(), new "case 5""

It recently became clear to me that there are some get_user_pages*()
callers that don't fit neatly into any of the four cases that are so far
listed in pin_user_pages.rst.  vhost.c is one of those.

Add a Case 5 to the documentation, and refer to that when converting
vhost.c.

Thanks to Jan Kara for helping me (again) in understanding the
interaction between get_user_pages() and page writeback [1].

This is based on today's mmotm, which has a nearby patch to
pin_user_pages.rst that rewords cases 3 and 4.

Note that I have only compile-tested the vhost.c patch, although that
does also include cross-compiling for a few other arches.  Any run-time
testing would be greatly appreciated.

[1] https://lore.kernel.org/r/20200529070343.GL14550@quack2.suse.cz

This patch (of 2):

There are four cases listed in pin_user_pages.rst.  These are intended
to help developers figure out whether to use get_user_pages*(), or
pin_user_pages*().  However, the four cases do not cover all the
situations.  For example, drivers/vhost/vhost.c has a "pin, write to
page, set page dirty, unpin" case.

Add a fifth case, to help explain that there is a general pattern that
requires pin_user_pages*() API calls.

[jhubbard@nvidia.com: v2]
  Link: http://lkml.kernel.org/r/20200601052633.853874-2-jhubbard@nvidia.com

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Jan Kara <jack@suse.cz>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: "Michael S . Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Link: http://lkml.kernel.org/r/20200529234309.484480-1-jhubbard@nvidia.com
Link: http://lkml.kernel.org/r/20200529234309.484480-2-jhubbard@nvidia.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-08 11:05:57 -07:00
..
ABI Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
PCI pci-v5.8-changes 2020-06-06 11:01:58 -07:00
RCU rcu: Make rcu_read_unlock_special() safe for rq/pi locks 2020-04-27 11:03:50 -07:00
accounting
admin-guide panic: add sysctl to dump all CPUs backtraces on oops event 2020-06-08 11:05:56 -07:00
arm docs: dt: convert ABI.txt to ReST format 2020-05-04 17:09:52 -05:00
arm64 A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
block for-5.8-tag 2020-06-02 19:59:25 -07:00
bpf docs/bpf: Add BPF ring buffer design notes 2020-06-01 14:38:22 -07:00
cdrom
core-api docs: mm/gup: pin_user_pages.rst: add a "case 5" 2020-06-08 11:05:57 -07:00
cpu-freq
crypto
dev-tools kcov: collect coverage from interrupts 2020-06-04 19:06:20 -07:00
devicetree Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
doc-guide media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
driver-api Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
fault-injection
fb media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
features mm/debug: add tests validating architecture page table helpers 2020-06-04 19:06:21 -07:00
filesystems A lot of bug fixes and cleanups for ext4, including: 2020-06-05 16:19:28 -07:00
firmware-guide usb: typec: Add firmware documentation for the Intel PMC mux control 2020-05-13 14:20:49 +02:00
firmware_class
fpga Documentation: fpga: dfl: add description for performance reporting support 2020-04-28 15:49:28 +02:00
gpu Merge tag 'drm-intel-next-2020-05-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2020-05-20 13:36:45 +10:00
hid
hwmon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
i2c docs: i2c: rename i2c.svg to i2c_bus.svg 2020-04-20 15:45:41 -06:00
ia64 docs: add IRQ documentation at the core-api book 2020-05-15 12:00:56 -06:00
ide
iio docs: filesystems: convert configfs.txt to ReST 2020-05-05 09:23:25 -06:00
infiniband RDMA/core: Remove FMR device ops 2020-06-02 20:32:54 -03:00
input
isdn
kbuild kbuild: doc: rename LDFLAGS to KBUILD_LDFLAGS 2020-06-06 23:39:20 +09:00
kernel-hacking
leds
livepatch livepatch: Remove .klp.arch 2020-05-08 00:12:42 +02:00
locking A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
m68k
maintainer Documentation: fixes to the maintainer-entry-profile template 2020-06-01 09:36:07 -06:00
mhi
mips
misc-devices doc: misc-device: add uacce to toctree(index) 2020-05-05 09:41:59 -06:00
netlabel
networking Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
nios2
nvdimm nvdimm: fixes to maintainter-entry-profile 2020-05-25 10:19:19 -06:00
openrisc
parisc
pcmcia
power Power management updates for 5.8-rc1 2020-06-02 13:17:23 -07:00
powerpc powerpc updates for 5.8 2020-06-05 12:39:30 -07:00
process Devicetree updates for v5.8: 2020-06-04 20:11:25 -07:00
riscv
s390 docs: s390: Fix wrong label Guest2 instead of Guest3 2020-05-05 09:45:28 -06:00
scheduler Documentation: scheduler: fix outdated information on sched groups 2020-04-21 13:38:27 -06:00
scsi
security Keyrings changes 2020-06-04 10:27:07 -07:00
sh
sound
sparc
sphinx docs: update recommended Sphinx version to 2.4.4 2020-04-20 15:35:58 -06:00
sphinx-static
spi
target
timers timer: add fsleep for flexible sleeping 2020-05-06 17:03:34 -07:00
trace Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
translations Devicetree updates for v5.8: 2020-06-04 20:11:25 -07:00
usb A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
userspace-api powerpc updates for 5.8 2020-06-05 12:39:30 -07:00
virt ARM: 2020-06-03 15:13:47 -07:00
vm tools/vm/page_owner_sort.c: filter out unneeded line 2020-06-03 20:09:49 -07:00
w1 w1_therm: adding bulk read support to trigger multiple conversion on bus 2020-05-15 16:29:00 +02:00
watchdog watchdog: clarify that stop() is optional 2020-05-25 08:55:42 +02:00
x86 A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
xtensa
.gitignore
COPYING-logo
Changes
CodingStyle
Kconfig
Makefile media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
SubmittingPatches
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
bus-virt-phys-mapping.txt
conf.py docs: LaTeX/PDF: drop list of documents 2020-04-20 15:35:58 -06:00
crc32.txt
docutils.conf
dontdiff modpost: generate vmlinux.symvers and reuse it for the second modpost 2020-06-06 23:38:12 +09:00
index.rst Devicetree updates for v5.8: 2020-06-04 20:11:25 -07:00
kprobes.txt
logo.gif
lzo.txt
mailbox.txt
memory-barriers.txt docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
nommu-mmap.txt
remoteproc.txt
rpmsg.txt
speculation.txt
static-keys.txt
tee.txt
this_cpu_ops.txt
xz.txt