Skip to contentSkip to conversation

docs/mm: describe current criteria for enabling split page table lock for PTE tables

PATCH Superseded Ethan Nelson-Moore 3 participants 3 messages Jun 13 – Jun 15

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/mm: describe current criteria for enabling split page table lock for PTE tables

The mm documentation regarding split page table lock for PTE tables refers to the CONFIG_SPLIT_PTLOCK_CPUS config option, which was superseded by CONFIG_SPLIT_PTE_PTLOCKS in commit 394290cba966 ("mm:
turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options"). Update the documentation to refer to the current option and document the situations in which this feature is not supported.

Discovered while searching for CONFIG_* symbols referenced in the kernel but not defined in any Kconfig file.

---
 Documentation/mm/split_page_table_lock.rst | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/mm/split_page_table_lock.rst +6 -3
index cc3cd46abd1b..c9d16024543b 100644
@@ -37,9 +37,12 @@ There are helpers to lock/unlock a table and other accessor functions:
  - pmd_lockptr()
 	returns pointer to PMD table lock;
 
-Split page table lock for PTE tables is enabled compile-time if
-CONFIG_SPLIT_PTLOCK_CPUS (usually 4) is less or equal to NR_CPUS.
-If split lock is disabled, all tables are guarded by mm->page_table_lock.
+Split page table lock for PTE tables is enabled compile-time (via
+CONFIG_SPLIT_PTE_PTLOCKS) if NR_CPUS is greater than or equal to 4 and an
+MMU is being used. However, it is not supported on ARM processors with
+virtually indexed, physically tagged caches, PA-RISC processors older than
+the PA-8000, or 32-bit SPARC processors. If split lock is disabled, all
+tables are guarded by mm->page_table_lock.
 
 Split page table lock for PMD tables is enabled, if it's enabled for PTE
 tables and the architecture supports it (see below).
Signature · 1 line
2.43.0
reviewer
#1 lore raw
Quoted 21 lines · Ethan Nelson-Moore

The mm documentation regarding split page table lock for PTE tables refers to the CONFIG_SPLIT_PTLOCK_CPUS config option, which was superseded by CONFIG_SPLIT_PTE_PTLOCKS in commit 394290cba966 ("mm:
turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options"). Update the documentation to refer to the current option and document the situations in which this feature is not supported.

Discovered while searching for CONFIG_* symbols referenced in the kernel but not defined in any Kconfig file.

---
 Documentation/mm/split_page_table_lock.rst | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/mm/split_page_table_lock.rst +0 -0
index cc3cd46abd1b..c9d16024543b 100644
@@ -37,9 +37,12 @@ There are helpers to lock/unlock a table and other accessor functions:
  - pmd_lockptr()

Documentation/mm/split_page_table_lock.rst There are helpers to lock/unlock a table and other accessor functions: · line 44

Quoted 10 lines
Documentation/mm/split_page_table_lock.rst +5 -3
 	returns pointer to PMD table lock;
 
-Split page table lock for PTE tables is enabled compile-time if
-CONFIG_SPLIT_PTLOCK_CPUS (usually 4) is less or equal to NR_CPUS.
-If split lock is disabled, all tables are guarded by mm->page_table_lock.
+Split page table lock for PTE tables is enabled compile-time (via
+CONFIG_SPLIT_PTE_PTLOCKS) if NR_CPUS is greater than or equal to 4 and an
+MMU is being used. However, it is not supported on ARM processors with
+virtually indexed, physically tagged caches, PA-RISC processors older than
+the PA-8000, or 32-bit SPARC processors. If split lock is disabled, all

"it is not supported on some architectures" would be enough IMO.

Quoted 7 lines
Documentation/mm/split_page_table_lock.rst +1 -0
+tables are guarded by mm->page_table_lock.
 
 Split page table lock for PMD tables is enabled, if it's enabled for PTE
 tables and the architecture supports it (see below).
Signature · 1 line
2.43.0
Signature · 2 lines
Sincerely yours,
Mike.
#2 lore raw
Quoted 24 lines · Mike Rapoport
Quoted 23 lines · Ethan Nelson-Moore

The mm documentation regarding split page table lock for PTE tables refers to the CONFIG_SPLIT_PTLOCK_CPUS config option, which was superseded by CONFIG_SPLIT_PTE_PTLOCKS in commit 394290cba966 ("mm:
turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options"). Update the documentation to refer to the current option and document the situations in which this feature is not supported.

Discovered while searching for CONFIG_* symbols referenced in the kernel but not defined in any Kconfig file.

---
 Documentation/mm/split_page_table_lock.rst | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Documentation/mm/split_page_table_lock.rst +0 -0
index cc3cd46abd1b..c9d16024543b 100644
@@ -37,9 +37,12 @@ There are helpers to lock/unlock a table and other accessor functions:
  - pmd_lockptr()
 	returns pointer to PMD table lock;
 
Quoted 10 lines

Documentation/mm/split_page_table_lock.rst There are helpers to lock/unlock a table and other accessor functions: · line 44

Quoted 8 lines
Documentation/mm/split_page_table_lock.rst +5 -3
-Split page table lock for PTE tables is enabled compile-time if
-CONFIG_SPLIT_PTLOCK_CPUS (usually 4) is less or equal to NR_CPUS.
-If split lock is disabled, all tables are guarded by mm->page_table_lock.
+Split page table lock for PTE tables is enabled compile-time (via
+CONFIG_SPLIT_PTE_PTLOCKS) if NR_CPUS is greater than or equal to 4 and an
+MMU is being used. However, it is not supported on ARM processors with
+virtually indexed, physically tagged caches, PA-RISC processors older than
+the PA-8000, or 32-bit SPARC processors. If split lock is disabled, all

"it is not supported on some architectures" would be enough IMO.

Yeah, we can keep this short.

Signature · 3 lines
Cheers,

David