linux-sg2042/Documentation
Yang Shi c06306696f mm: thp: fix false negative of shmem vma's THP eligibility
Commit 7635d9cbe8 ("mm, thp, proc: report THP eligibility for each
vma") introduced THPeligible bit for processes' smaps.  But, when
checking the eligibility for shmem vma, __transparent_hugepage_enabled()
is called to override the result from shmem_huge_enabled().  It may
result in the anonymous vma's THP flag override shmem's.  For example,
running a simple test which create THP for shmem, but with anonymous THP
disabled, when reading the process's smaps, it may show:

  7fc92ec00000-7fc92f000000 rw-s 00000000 00:14 27764 /dev/shm/test
  Size:               4096 kB
  ...
  [snip]
  ...
  ShmemPmdMapped:     4096 kB
  ...
  [snip]
  ...
  THPeligible:    0

And, /proc/meminfo does show THP allocated and PMD mapped too:

  ShmemHugePages:     4096 kB
  ShmemPmdMapped:     4096 kB

This doesn't make too much sense.  The shmem objects should be treated
separately from anonymous THP.  Calling shmem_huge_enabled() with
checking MMF_DISABLE_THP sounds good enough.  And, we could skip stack
and dax vma check since we already checked if the vma is shmem already.

Also check if vma is suitable for THP by calling
transhuge_vma_suitable().

And minor fix to smaps output format and documentation.

Link: http://lkml.kernel.org/r/1560401041-32207-3-git-send-email-yang.shi@linux.alibaba.com
Fixes: 7635d9cbe8 ("mm, thp, proc: report THP eligibility for each vma")
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-18 17:08:06 -07:00
..
ABI platform/x86: asus: Rename "fan mode" to "fan boost mode" 2019-07-17 19:07:58 +03:00
EDID docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
PCI Documentation: PCI: convert endpoint/pci-test-howto.txt to reST 2019-05-30 17:54:34 -05:00
RCU It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
accounting docs: add some documentation dirs to the driver-api book 2019-07-15 11:03:02 -03:00
acpi/dsd docs: fix broken documentation links 2019-06-08 13:42:13 -06:00
admin-guide Merge branch 'akpm' (patches from Andrew) 2019-07-17 08:58:04 -07:00
arm docs: arm: fix a breakage with pdf output 2019-07-15 11:03:04 -03:00
arm64 docs: add arch doc directories to the index 2019-07-15 11:03:01 -03:00
auxdisplay docs: admin-guide: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
block docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
cdrom docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
core-api docs: admin-guide: move sysctl directory to it 2019-07-15 11:03:01 -03:00
cpu-freq docs: power: convert docs to ReST and rename to *.rst 2019-06-14 16:08:36 -05:00
crypto crypto: doc - Fix formatting of new crypto engine content 2019-07-03 22:13:12 +08:00
dev-tools docs: kmemleak: add more documentation details 2019-07-12 11:05:42 -07:00
devicetree hwspinlock updates for v5.3 2019-07-17 11:53:53 -07:00
doc-guide Doc : doc-guide : Fix a typo 2019-06-28 09:04:14 -06:00
driver-api This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
fault-injection docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
fb docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
features Documentation/stackprotector: powerpc supports stack protector 2019-06-14 14:44:43 -06:00
filesystems mm: thp: fix false negative of shmem vma's THP eligibility 2019-07-18 17:08:06 -07:00
firmware-guide docs: gpio: add sysfs interface to the admin-guide 2019-07-15 11:03:03 -03:00
firmware_class
fpga docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
gpu drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00
hid docs: add some documentation dirs to the driver-api book 2019-07-15 11:03:02 -03:00
hwmon docs: driver-model: move it to the driver-api book 2019-07-15 11:03:02 -03:00
i2c Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
ia64 docs: add SPDX tags to new index files 2019-07-15 11:03:03 -03:00
ide docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
iio docs: add some documentation dirs to the driver-api book 2019-07-15 11:03:02 -03:00
infiniband docs: infiniband: add it to the driver-api bookset 2019-07-08 14:22:56 -03:00
input docs: hid: convert to ReST 2019-07-02 10:19:34 +02:00
ioctl docs: ioctl: add it to the uAPI guide 2019-07-15 09:20:28 -03:00
isdn isdn: remove isdn4linux 2019-05-31 11:13:10 +02:00
kbuild docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kernel-hacking docs: locking: convert docs to ReST and rename to *.rst 2019-07-15 08:53:27 -03:00
leds docs: leds: add it to the driver-api book 2019-07-15 09:20:28 -03:00
livepatch docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
locking docs: locking: add it to the main index 2019-07-15 11:03:03 -03:00
m68k docs: add arch doc directories to the index 2019-07-15 11:03:01 -03:00
maintainer docs: Add a document on repository management 2019-06-18 09:33:16 -06:00
media media: doc-rst: Fix typos 2019-06-27 07:35:47 -04:00
mic docs: driver-api: add remaining converted dirs to it 2019-07-15 11:03:03 -03:00
mips
misc-devices docs: misc-devices: convert files without extension to ReST 2019-07-03 21:09:41 +02:00
netlabel docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
networking docs: admin-guide: move sysctl directory to it 2019-07-15 11:03:01 -03:00
nios2
openrisc
parisc
pcmcia docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
power More power management updates for 5.3-rc1 2019-07-18 09:32:28 -07:00
powerpc docs: admin-guide: add kdump documentation into it 2019-07-15 11:03:01 -03:00
process docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
riscv docs: add arch doc directories to the index 2019-07-15 11:03:01 -03:00
s390 docs: don't use nested tables 2019-07-15 11:03:04 -03:00
scheduler docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
scsi scsi: ufs: Documentation: Announce ufs-tool v1.0 2019-06-26 22:47:51 -04:00
security docs: security: move some books to it and update 2019-07-15 11:03:01 -03:00
sh
sound
sparc docs: add arch doc directories to the index 2019-07-15 11:03:01 -03:00
sphinx docs: automarkup.py: ignore exceptions when seeking for xrefs 2019-07-08 14:35:47 -06:00
sphinx-static
spi
target docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
thermal docs: thermal: convert to ReST 2019-06-27 21:22:15 +08:00
timers docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
trace pci-v5.3-changes 2019-07-15 20:44:49 -07:00
translations docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
usb docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
userspace-api docs: ocxl.rst: add it to the uAPI book 2019-07-15 11:03:02 -03:00
virtual ARM: 2019-07-12 15:35:14 -07:00
vm docs: cgroup-v1: add it to the admin-guide book 2019-07-15 11:03:02 -03:00
w1 docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
watchdog docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
wimax
x86 docs: admin-guide: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
xtensa docs: add arch doc directories to the index 2019-07-15 11:03:01 -03:00
.gitignore
COPYING-logo docs: logo.txt: rename it to COPYING-logo 2019-07-15 09:20:27 -03:00
Changes
CodingStyle
DMA-API-HOWTO.txt docs: DMA-API-HOWTO.txt: fix an unmarked code block 2019-07-15 09:20:24 -03:00
DMA-API.txt Documentation: DMA-API: fix a function name of max_mapping_size 2019-06-07 11:10:33 -06:00
DMA-ISA-LPC.txt
DMA-attributes.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
Kconfig docs: Kbuild/Makefile: allow check for missing docs at build time 2019-06-07 11:33:16 -06:00
Makefile docs: Kbuild/Makefile: allow check for missing docs at build time 2019-06-07 11:33:16 -06:00
SubmittingPatches
atomic_bitops.txt
atomic_t.txt Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 16:12:03 -07:00
bus-virt-phys-mapping.txt
conf.py Disable Sphinx SmartyPants in HTML output 2019-06-30 15:30:34 -06:00
crc32.txt
debugging-modules.txt
debugging-via-ohci1394.txt
digsig.txt
docutils.conf doc-rst: Add missing newline at end of file 2019-06-20 14:16:56 -06:00
dontdiff kbuild: do not create wrappers for header-test-y 2019-07-09 10:10:27 +09:00
futex-requeue-pi.txt
hwspinlock.txt hwspinlock: add the 'in_atomic' API 2019-06-29 21:08:14 -07:00
index.rst docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
io-mapping.txt
io_ordering.txt
irqflags-tracing.txt
kobject.txt
kprobes.txt
kref.txt
logo.gif
lzo.txt
mailbox.txt
memory-barriers.txt It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
nommu-mmap.txt
packing.txt
padata.txt
percpu-rw-semaphore.txt
pi-futex.txt docs: locking: convert docs to ReST and rename to *.rst 2019-07-15 08:53:27 -03:00
preempt-locking.txt
rbtree.txt docs: rbtree.txt: fix Sphinx build warnings 2019-07-15 09:20:24 -03:00
remoteproc.txt remoteproc: add vendor resources handling 2019-06-29 12:02:17 -07:00
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
speculation.txt
static-keys.txt
tee.txt Documentation: tee: Grammar s/the its/its/ 2019-06-07 11:23:38 -06:00
this_cpu_ops.txt
unaligned-memory-access.txt
xz.txt