Matthew Wilcox (Oracle)
|
a160e5377b
|
mm: convert do_swap_page() to use folio_free_swap()
Also convert should_try_to_free_swap() to use a folio. This removes a few
calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-47-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:53 -07:00 |
|
Matthew Wilcox (Oracle)
|
b4e6f66e45
|
ksm: use a folio in replace_page()
Replace three calls to compound_head() with one.
Link: https://lkml.kernel.org/r/20220902194653.1739778-46-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:53 -07:00 |
|
Matthew Wilcox (Oracle)
|
5fcd079af9
|
uprobes: use folios more widely in __replace_page()
Remove a few hidden calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-45-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:52 -07:00 |
|
Matthew Wilcox (Oracle)
|
98b211d641
|
madvise: convert madvise_free_pte_range() to use a folio
Saves a lot of calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-44-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:52 -07:00 |
|
Matthew Wilcox (Oracle)
|
2fad3d14b9
|
huge_memory: convert do_huge_pmd_wp_page() to use a folio
Removes many calls to compound_head(). Does not remove the assumption
that a folio may not be larger than a PMD.
Link: https://lkml.kernel.org/r/20220902194653.1739778-43-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:52 -07:00 |
|
Matthew Wilcox (Oracle)
|
e4a2ed9490
|
mm: convert do_wp_page() to use a folio
Saves many calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-42-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:52 -07:00 |
|
Matthew Wilcox (Oracle)
|
71fa1a533d
|
swap: convert swap_writepage() to use a folio
Removes many calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-41-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:52 -07:00 |
|
Matthew Wilcox (Oracle)
|
aedd74d439
|
swap_state: convert free_swap_cache() to use a folio
Saves several calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-40-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:51 -07:00 |
|
Matthew Wilcox (Oracle)
|
cb691e2f28
|
mm: remove lookup_swap_cache()
All callers have now been converted to swap_cache_get_folio(), so we can
remove this wrapper.
Link: https://lkml.kernel.org/r/20220902194653.1739778-39-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:51 -07:00 |
|
Matthew Wilcox (Oracle)
|
5a423081b2
|
mm: convert do_swap_page() to use swap_cache_get_folio()
Saves a folio->page->folio conversion.
Link: https://lkml.kernel.org/r/20220902194653.1739778-38-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:51 -07:00 |
|
Matthew Wilcox (Oracle)
|
f102cd8b17
|
swapfile: convert unuse_pte_range() to use a folio
Delay fetching the precise page from the folio until we're in unuse_pte().
Saves many calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-37-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:51 -07:00 |
|
Matthew Wilcox (Oracle)
|
2c3f6194b0
|
swapfile: convert __try_to_reclaim_swap() to use a folio
Saves five calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-36-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:51 -07:00 |
|
Matthew Wilcox (Oracle)
|
000085b9af
|
swapfile: convert try_to_unuse() to use a folio
Saves five calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-35-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:50 -07:00 |
|
Matthew Wilcox (Oracle)
|
923e2f0e7c
|
shmem: remove shmem_getpage()
With all callers removed, remove this wrapper function. The flags are now
mysteriously called SGP, but I think we can live with that.
Link: https://lkml.kernel.org/r/20220902194653.1739778-34-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:50 -07:00 |
|
Matthew Wilcox (Oracle)
|
12acf4fbc4
|
userfaultfd: convert mcontinue_atomic_pte() to use a folio
shmem_getpage() is being replaced by shmem_get_folio() so use a folio
throughout this function. Saves several calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-33-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:50 -07:00 |
|
Matthew Wilcox (Oracle)
|
7459c149ae
|
khugepaged: call shmem_get_folio()
shmem_getpage() is being removed, so call its replacement and find the
precise page ourselves.
Link: https://lkml.kernel.org/r/20220902194653.1739778-32-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:50 -07:00 |
|
Matthew Wilcox (Oracle)
|
e4b57722d0
|
shmem: convert shmem_get_link() to use a folio
Symlinks will never use a large folio, but using the folio API removes a
lot of unnecessary folio->page->folio conversions.
Link: https://lkml.kernel.org/r/20220902194653.1739778-31-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:50 -07:00 |
|
Matthew Wilcox (Oracle)
|
7ad0414bde
|
shmem: convert shmem_symlink() to use a folio
While symlinks will always be < PAGE_SIZE, using the folio APIs gets rid
of unnecessary calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-30-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:49 -07:00 |
|
Matthew Wilcox (Oracle)
|
b0802b22a9
|
shmem: convert shmem_fallocate() to use a folio
Call shmem_get_folio() and use the folio APIs instead of the page APIs.
Saves several calls to compound_head() and removes assumptions about the
size of a large folio.
Link: https://lkml.kernel.org/r/20220902194653.1739778-29-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:49 -07:00 |
|
Matthew Wilcox (Oracle)
|
4601e2fc8b
|
shmem: convert shmem_file_read_iter() to use shmem_get_folio()
Use a folio throughout, saving five calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-28-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:49 -07:00 |
|
Matthew Wilcox (Oracle)
|
eff1f906c2
|
shmem: convert shmem_write_begin() to use shmem_get_folio()
Use a folio throughout this function, saving a couple of calls to
compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-27-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:49 -07:00 |
|
Matthew Wilcox (Oracle)
|
a7f5862cc0
|
shmem: convert shmem_get_partial_folio() to use shmem_get_folio()
Get rid of an unnecessary folio->page->folio conversion.
Link: https://lkml.kernel.org/r/20220902194653.1739778-26-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:49 -07:00 |
|
Matthew Wilcox (Oracle)
|
4e1fc793ad
|
shmem: add shmem_get_folio()
With no remaining callers of shmem_getpage_gfp(), add shmem_get_folio()
and reimplement shmem_getpage() as a call to shmem_get_folio().
Link: https://lkml.kernel.org/r/20220902194653.1739778-25-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:49 -07:00 |
|
Matthew Wilcox (Oracle)
|
a3a9c39704
|
shmem: convert shmem_read_mapping_page_gfp() to use shmem_get_folio_gfp()
Saves a couple of calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-24-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:48 -07:00 |
|
Matthew Wilcox (Oracle)
|
68a541001a
|
shmem: convert shmem_fault() to use shmem_get_folio_gfp()
No particular advantage for this function, but necessary to remove
shmem_getpage_gfp().
[hughd@google.com: fix crash]
Link: https://lkml.kernel.org/r/7693a84-bdc2-27b5-2695-d0fe8566571f@google.com
Link: https://lkml.kernel.org/r/20220902194653.1739778-23-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
2022-10-03 14:02:48 -07:00 |
|