* [to-be-updated] mm-introduce-a-pageflag-for-partially-mapped-folios-fix.patch removed from -mm tree
@ 2024-08-15 23:08 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-08-15 23:08 UTC (permalink / raw)
To: mm-commits, baohua, usamaarif642, akpm
The quilt patch titled
Subject: mm-introduce-a-pageflag-for-partially-mapped-folios-fix
has been removed from the -mm tree. Its filename was
mm-introduce-a-pageflag-for-partially-mapped-folios-fix.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Usama Arif <usamaarif642@gmail.com>
Subject: mm-introduce-a-pageflag-for-partially-mapped-folios-fix
Date: Wed, 14 Aug 2024 13:36:58 +0100
fix MTHP_STAT_SPLIT_DEFERRED for PMD_ORDER
Link: https://lkml.kernel.org/r/88d411c5-6d66-4d41-ae86-e0f943e5fb91@gmail.com
Signed-off-by: Usama Arif <usamaarif642@gmail.com>
Cc: Barry Song <baohua@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/huge_memory.c | 17 +++++++++--------
mm/rmap.c | 2 +-
2 files changed, 10 insertions(+), 9 deletions(-)
--- a/mm/huge_memory.c~mm-introduce-a-pageflag-for-partially-mapped-folios-fix
+++ a/mm/huge_memory.c
@@ -3452,6 +3452,7 @@ void __folio_undo_large_rmappable(struct
spin_unlock_irqrestore(&ds_queue->split_queue_lock, flags);
}
+/* partially_mapped=false won't clear PG_partially_mapped folio flag */
void deferred_split_folio(struct folio *folio, bool partially_mapped)
{
struct deferred_split *ds_queue = get_deferred_split_queue(folio);
@@ -3481,16 +3482,16 @@ void deferred_split_folio(struct folio *
return;
spin_lock_irqsave(&ds_queue->split_queue_lock, flags);
- if (partially_mapped)
+ if (partially_mapped) {
folio_set_partially_mapped(folio);
- else
- folio_clear_partially_mapped(folio);
+ if (folio_test_pmd_mappable(folio))
+ count_vm_event(THP_DEFERRED_SPLIT_PAGE);
+ count_mthp_stat(folio_order(folio), MTHP_STAT_SPLIT_DEFERRED);
+ } else {
+ /* partially mapped folios cannont become partially unmapped */
+ VM_WARN_ON_FOLIO(folio_test_partially_mapped(folio), folio);
+ }
if (list_empty(&folio->_deferred_list)) {
- if (partially_mapped) {
- if (folio_test_pmd_mappable(folio))
- count_vm_event(THP_DEFERRED_SPLIT_PAGE);
- count_mthp_stat(folio_order(folio), MTHP_STAT_SPLIT_DEFERRED);
- }
list_add_tail(&folio->_deferred_list, &ds_queue->split_queue);
ds_queue->split_queue_len++;
#ifdef CONFIG_MEMCG
--- a/mm/rmap.c~mm-introduce-a-pageflag-for-partially-mapped-folios-fix
+++ a/mm/rmap.c
@@ -1578,7 +1578,7 @@ static __always_inline void __folio_remo
* Check partially_mapped first to ensure it is a large folio.
*/
if (partially_mapped && folio_test_anon(folio) &&
- list_empty(&folio->_deferred_list))
+ !folio_test_partially_mapped(folio))
deferred_split_folio(folio, true);
__folio_mod_stat(folio, -nr, -nr_pmdmapped);
_
Patches currently in -mm which might be from usamaarif642@gmail.com are
mm-free-zapped-tail-pages-when-splitting-isolated-thp-fix.patch
mm-introduce-a-pageflag-for-partially-mapped-folios.patch
mm-split-underutilized-thps.patch
mm-add-sysfs-entry-to-disable-splitting-underutilized-thps.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-15 23:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 23:08 [to-be-updated] mm-introduce-a-pageflag-for-partially-mapped-folios-fix.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.