Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
03939cf0
Commit
03939cf0
authored
Jul 25, 2022
by
Will Deacon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-next/mm' into for-next/core
* for-next/mm: arm64: enable THP_SWAP for arm64
parents
02eab44c
d0637c50
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
1 deletion
+20
-1
arch/arm64/Kconfig
arch/arm64/Kconfig
+1
-0
arch/arm64/include/asm/pgtable.h
arch/arm64/include/asm/pgtable.h
+6
-0
include/linux/huge_mm.h
include/linux/huge_mm.h
+12
-0
mm/swap_slots.c
mm/swap_slots.c
+1
-1
No files found.
arch/arm64/Kconfig
View file @
03939cf0
...
@@ -101,6 +101,7 @@ config ARM64
...
@@ -101,6 +101,7 @@ config ARM64
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_WANTS_NO_INSTR
select ARCH_WANTS_NO_INSTR
select ARCH_WANTS_THP_SWAP if ARM64_4K_PAGES
select ARCH_HAS_UBSAN_SANITIZE_ALL
select ARCH_HAS_UBSAN_SANITIZE_ALL
select ARM_AMBA
select ARM_AMBA
select ARM_ARCH_TIMER
select ARM_ARCH_TIMER
...
...
arch/arm64/include/asm/pgtable.h
View file @
03939cf0
...
@@ -45,6 +45,12 @@
...
@@ -45,6 +45,12 @@
__flush_tlb_range(vma, addr, end, PUD_SIZE, false, 1)
__flush_tlb_range(vma, addr, end, PUD_SIZE, false, 1)
#endif
/* CONFIG_TRANSPARENT_HUGEPAGE */
#endif
/* CONFIG_TRANSPARENT_HUGEPAGE */
static
inline
bool
arch_thp_swp_supported
(
void
)
{
return
!
system_supports_mte
();
}
#define arch_thp_swp_supported arch_thp_swp_supported
/*
/*
* Outside of a few very special situations (e.g. hibernation), we always
* Outside of a few very special situations (e.g. hibernation), we always
* use broadcast TLB invalidation instructions, therefore a spurious page
* use broadcast TLB invalidation instructions, therefore a spurious page
...
...
include/linux/huge_mm.h
View file @
03939cf0
...
@@ -461,4 +461,16 @@ static inline int split_folio_to_list(struct folio *folio,
...
@@ -461,4 +461,16 @@ static inline int split_folio_to_list(struct folio *folio,
return
split_huge_page_to_list
(
&
folio
->
page
,
list
);
return
split_huge_page_to_list
(
&
folio
->
page
,
list
);
}
}
/*
* archs that select ARCH_WANTS_THP_SWAP but don't support THP_SWP due to
* limitations in the implementation like arm64 MTE can override this to
* false
*/
#ifndef arch_thp_swp_supported
static
inline
bool
arch_thp_swp_supported
(
void
)
{
return
true
;
}
#endif
#endif
/* _LINUX_HUGE_MM_H */
#endif
/* _LINUX_HUGE_MM_H */
mm/swap_slots.c
View file @
03939cf0
...
@@ -307,7 +307,7 @@ swp_entry_t folio_alloc_swap(struct folio *folio)
...
@@ -307,7 +307,7 @@ swp_entry_t folio_alloc_swap(struct folio *folio)
entry
.
val
=
0
;
entry
.
val
=
0
;
if
(
folio_test_large
(
folio
))
{
if
(
folio_test_large
(
folio
))
{
if
(
IS_ENABLED
(
CONFIG_THP_SWAP
))
if
(
IS_ENABLED
(
CONFIG_THP_SWAP
)
&&
arch_thp_swp_supported
()
)
get_swap_pages
(
1
,
&
entry
,
folio_nr_pages
(
folio
));
get_swap_pages
(
1
,
&
entry
,
folio_nr_pages
(
folio
));
goto
out
;
goto
out
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment