1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/Documentation/mm
Fabio M. De Francesco a9e9c93966 Documentation/mm: add details about kmap_local_page() and preemption
What happens if a thread is preempted after mapping pages with
kmap_local_page() was questioned recently.[1]

Commit f3ba3c710a ("mm/highmem: Provide kmap_local*") from Thomas
Gleixner explains clearly that on context switch, the maps of an outgoing
task are removed and the map of the incoming task are restored and that
kmap_local_page() can be invoked from both preemptible and atomic
contexts.[2]

Therefore, for the purpose to make it clearer that users can call
kmap_local_page() from contexts that allow preemption, rework a couple of
sentences and add further information in highmem.rst.

[1] https://lore.kernel.org/lkml/5303077.Sb9uPGUboI@opensuse/
[2] https://lore.kernel.org/all/20201118204007.468533059@linutronix.de/

Link: https://lkml.kernel.org/r/20220728154844.10874-8-fmdefrancesco@gmail.com
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Suggested-by: Ira Weiny <ira.weiny@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-08-08 18:06:46 -07:00
..
damon docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
active_mm.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
arch_pgtable_helpers.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
balance.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
bootmem.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
free_page_reporting.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
frontswap.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
highmem.rst Documentation/mm: add details about kmap_local_page() and preemption 2022-08-08 18:06:46 -07:00
hmm.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
hugetlbfs_reserv.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
hwpoison.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
index.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
ksm.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
memory-model.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
mmu_notifier.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
numa.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
oom.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
overcommit-accounting.rst - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
page_allocation.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
page_cache.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
page_frags.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
page_migration.rst - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
page_owner.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
page_reclaim.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
page_table_check.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
page_tables.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
physical_memory.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
process_addrs.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
remap_file_pages.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
shmfs.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
slab.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
slub.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
split_page_table_lock.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
swap.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
transhuge.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
unevictable-lru.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
vmalloc.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
vmalloced-kernel-stacks.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
vmemmap_dedup.rst mm: hugetlb_vmemmap: move code comments to vmemmap_dedup.rst 2022-08-08 18:06:43 -07:00
z3fold.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
zsmalloc.rst docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00