diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2024-04-24 16:33:37 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-04-24 16:33:37 -0700 |
commit | a7780adf39be8717ac547b4cbbb9e00304f4dd5a (patch) | |
tree | df9618c75489df6a05861401c0d6123155cf26a0 | |
parent | 1afa71160206c4ae617271b0fb0303a358faf529 (diff) | |
download | 25-new-a7780adf39be8717ac547b4cbbb9e00304f4dd5a.tar.gz |
foo
4 files changed, 105 insertions, 0 deletions
diff --git a/patches/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.patch b/patches/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.patch new file mode 100644 index 000000000..f87a52ab9 --- /dev/null +++ b/patches/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.patch @@ -0,0 +1,90 @@ +From: Andrew Morton <akpm@linux-foundation.org> +Subject: mm: convert hugetlb_page_mapping_lock_write() to hugetlb_folio_mapping_lock_write +Date: Wed Apr 24 04:20:30 PM PDT 2024 + +Convert this to use folios, so we can remove page_mapping() + +Cc: David Hildenbrand <david@redhat.com> +Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + include/linux/hugetlb.h | 6 +++--- + mm/hugetlb.c | 6 +++--- + mm/memory-failure.c | 4 ++-- + mm/migrate.c | 2 +- + 4 files changed, 9 insertions(+), 9 deletions(-) + +--- a/mm/hugetlb.c~mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write ++++ a/mm/hugetlb.c +@@ -2155,13 +2155,13 @@ static bool prep_compound_gigantic_folio + /* + * Find and lock address space (mapping) in write mode. + * +- * Upon entry, the page is locked which means that page_mapping() is ++ * Upon entry, the folio is locked which means that folio_mapping() is + * stable. Due to locking order, we can only trylock_write. If we can + * not get the lock, simply return NULL to caller. + */ +-struct address_space *hugetlb_page_mapping_lock_write(struct page *hpage) ++struct address_space *hugetlb_folio_mapping_lock_write(struct folio *folio) + { +- struct address_space *mapping = page_mapping(hpage); ++ struct address_space *mapping = folio_mapping(folio); + + if (!mapping) + return mapping; +--- a/mm/memory-failure.c~mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write ++++ a/mm/memory-failure.c +@@ -1595,7 +1595,7 @@ static bool hwpoison_user_mappings(struc + * XXX: the dirty test could be racy: set_page_dirty() may not always + * be called inside page lock (it's recommended but not enforced). + */ +- mapping = page_mapping(hpage); ++ mapping = folio_mapping(folio); + if (!(flags & MF_MUST_KILL) && !PageDirty(hpage) && mapping && + mapping_can_writeback(mapping)) { + if (page_mkclean(hpage)) { +@@ -1622,7 +1622,7 @@ static bool hwpoison_user_mappings(struc + * TTU_RMAP_LOCKED to indicate we have taken the lock + * at this higher level. + */ +- mapping = hugetlb_page_mapping_lock_write(hpage); ++ mapping = hugetlb_folio_mapping_lock_write(folio); + if (mapping) { + try_to_unmap(folio, ttu|TTU_RMAP_LOCKED); + i_mmap_unlock_write(mapping); +--- a/include/linux/hugetlb.h~mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write ++++ a/include/linux/hugetlb.h +@@ -178,7 +178,7 @@ bool hugetlbfs_pagecache_present(struct + struct vm_area_struct *vma, + unsigned long address); + +-struct address_space *hugetlb_page_mapping_lock_write(struct page *hpage); ++struct address_space *hugetlb_folio_mapping_lock_write(struct folio *folio); + + extern int sysctl_hugetlb_shm_group; + extern struct list_head huge_boot_pages[MAX_NUMNODES]; +@@ -297,8 +297,8 @@ static inline unsigned long hugetlb_tota + return 0; + } + +-static inline struct address_space *hugetlb_page_mapping_lock_write( +- struct page *hpage) ++static inline struct address_space *hugetlb_folio_mapping_lock_write( ++ struct folio *folio) + { + return NULL; + } +--- a/mm/migrate.c~mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write ++++ a/mm/migrate.c +@@ -1425,7 +1425,7 @@ static int unmap_and_move_huge_page(new_ + * semaphore in write mode here and set TTU_RMAP_LOCKED + * to let lower levels know we have taken the lock. + */ +- mapping = hugetlb_page_mapping_lock_write(&src->page); ++ mapping = hugetlb_folio_mapping_lock_write(src); + if (unlikely(!mapping)) + goto unlock_put_anon; + +_ diff --git a/pc/devel-series b/pc/devel-series index 5cbea0c06..a23316e8b 100644 --- a/pc/devel-series +++ b/pc/devel-series @@ -703,6 +703,8 @@ memcg-simple-cleanup-of-stats-update-functions.patch xarray-use-bits_per_longs.patch xarray-dont-use-proxy-headers.patch # +mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.patch +# fscrypt-convert-bh_get_inode_and_lblk_num-to-use-a-folio.patch f2fs-convert-f2fs_clear_page_cache_dirty_tag-to-use-a-folio.patch memory-failure-remove-calls-to-page_mapping.patch @@ -903,3 +905,4 @@ media-stih-cec-add-missing-ioh.patch kfifo-dont-use-proxy-headers.patch # #ENDBRANCH mm-nonmm-unstable + diff --git a/pc/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.pc b/pc/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.pc new file mode 100644 index 000000000..be7b32cf1 --- /dev/null +++ b/pc/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.pc @@ -0,0 +1,4 @@ +mm/hugetlb.c +mm/memory-failure.c +include/linux/hugetlb.h +mm/migrate.c diff --git a/txt/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.txt b/txt/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.txt new file mode 100644 index 000000000..8952e8671 --- /dev/null +++ b/txt/mm-convert-hugetlb_page_mapping_lock_write-to-hugetlb_folio_mapping_lock_write.txt @@ -0,0 +1,8 @@ +From: Andrew Morton <akpm@linux-foundation.org> +Subject: mm: convert hugetlb_page_mapping_lock_write() to hugetlb_folio_mapping_lock_write +Date: Wed Apr 24 04:20:30 PM PDT 2024 + +Convert this to use folios, so we can remove page_mapping() + +Cc: David Hildenbrand <david@redhat.com> +Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> |