Go to file
Michel Lespinasse 2704b599da mmap locking API: initial implementation as rwsem wrappers
commit 9740ca4e95 upstream.

This patch series adds a new mmap locking API replacing the existing
mmap_sem lock and unlocks.  Initially the API is just implemente in terms
of inlined rwsem calls, so it doesn't provide any new functionality.

There are two justifications for the new API:

- At first, it provides an easy hooking point to instrument mmap_sem
  locking latencies independently of any other rwsems.

- In the future, it may be a starting point for replacing the rwsem
  implementation with a different one, such as range locks.  This is
  something that is being explored, even though there is no wide concensus
  about this possible direction yet.  (see
  https://patchwork.kernel.org/cover/11401483/)

This patch (of 12):

This change wraps the existing mmap_sem related rwsem calls into a new
mmap locking API.  There are two justifications for the new API:

- At first, it provides an easy hooking point to instrument mmap_sem
  locking latencies independently of any other rwsems.

- In the future, it may be a starting point for replacing the rwsem
  implementation with a different one, such as range locks.

Intel-SIG: commit 9740ca4e95 mmap locking API: initial implementation
as rwsem wrappers
Backport for SGX virtualization support on Intel Xeon platform.

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Davidlohr Bueso <dbueso@suse.de>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Liam Howlett <Liam.Howlett@oracle.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ying Han <yinghan@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Michel Lespinasse <walken@google.com>
Link: http://lkml.kernel.org/r/20200520052908.204642-1-walken@google.com
Link: http://lkml.kernel.org/r/20200520052908.204642-2-walken@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Zhiquan Li: amend commit log ]
Signed-off-by: Zhiquan Li <zhiquan1.li@intel.com>
2024-06-11 21:23:42 +08:00
Documentation kselftest: add fixture variants 2024-06-11 21:23:40 +08:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
arch x86/NUMA: Provide a range-to-target_node lookup facility 2024-06-11 21:23:38 +08:00
block ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
certs ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
crypto ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
dist dist: remove leds from filter out directory 2024-06-11 21:23:35 +08:00
drivers ACPI: NUMA: Up-level "map to online node" functionality 2024-06-11 21:23:37 +08:00
fs fuse: fix one null ptr issue in fuse_dev_ioctl 2024-06-11 21:18:45 +08:00
include mmap locking API: initial implementation as rwsem wrappers 2024-06-11 21:23:42 +08:00
init irqlatency: add irq latency monitor support 2024-06-11 21:18:47 +08:00
ipc ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
kernel irqlatency: add irq latency monitor support 2024-06-11 21:18:47 +08:00
lib lib: Uplevel the pmem "region" ida to a global allocator 2024-06-11 21:18:38 +08:00
mm x86/mm: Introduce CONFIG_NUMA_KEEP_MEMINFO 2024-06-11 21:23:38 +08:00
net ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
package iommu/vt-d: Retain PASID entry if guest switched remapping mode 2024-06-11 21:18:02 +08:00
samples vfio/mbochs: Fix close when multiple device FDs are open 2024-06-11 21:15:41 +08:00
scripts PCI / VFIO: Add 'override_only' support for VFIO PCI sub system 2024-06-11 21:15:47 +08:00
security ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
sound I2S driver support for Phytium CPUs 2024-06-11 21:23:34 +08:00
tools selftests/harness: Refactor XFAIL into SKIP 2024-06-11 21:23:41 +08:00
usr tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
virt kvm: rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS 2024-06-11 21:17:35 +08:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
.gitignore ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS Phytium JPEG Encoder driver 2024-06-11 21:23:30 +08:00
Makefile ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
README.md tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
backport_remove_lists.txt tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
tools_key.pub tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00

README.md

Tencent Linux Kernel 4.0