lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230913095131.2426871-1-wangkefeng.wang@huawei.com>
Date:   Wed, 13 Sep 2023 17:51:23 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     <willy@...radead.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>, <ying.huang@...el.com>,
        <david@...hat.com>, Zi Yan <ziy@...dia.com>,
        Mike Kravetz <mike.kravetz@...cle.com>, <hughd@...gle.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: [PATCH v3 0/8] mm: migrate: more folio conversion and unification

Convert more migrate functions to use a folio, it is also a preparation
for large folio migration support when numa balance.

The patch 1~2	remove unexpected specific assert for PageTransHuge page.

The Patch 3~6	convert several more migration functions to use folio. 
		1) add_page_for_migration() used by move_pages
		2) migrate_misplaced_page()/numamigrate_isolate_page()
		   used by numa balance

The patch 7	remove PageHead() check to make hugetlb to migrate the
		entire hugetlb page instead of -EACCES errno return when
		passed the address of a tail page.

The patch 8	cleanup to unify and simplify code a bit in
		add_page_for_migration()

Thanks for all comments and suggestions from Matthew, Hugh, Zi, Mike, Huang.

v3:
- update changelog of patch1
- use folio_estimated_sharers and comment it in migrate_misplaced_folio()
- collect RB/ACK
- rebased on 6.6-rc1

v2:
- keep page_mapcount() check and remove specific assert for
  PageTransHuge page.
- separate patch7 to migrate the entire hugetlb page if a tail page passed,
  which unified the behavior between HUGETLB and THP when move_page().

Kefeng Wang (8):
  mm: migrate: remove PageTransHuge check in numamigrate_isolate_page()
  mm: migrate: remove THP mapcount check in numamigrate_isolate_page()
  mm: migrate: convert numamigrate_isolate_page() to
    numamigrate_isolate_folio()
  mm: migrate: convert migrate_misplaced_page() to
    migrate_misplaced_folio()
  mm: migrate: use __folio_test_movable()
  mm: migrate: use a folio in add_page_for_migration()
  mm: migrate: remove PageHead() check for HugeTLB in
    add_page_for_migration()
  mm: migrate: remove isolated variable in add_page_for_migration()

 include/linux/migrate.h |   4 +-
 mm/huge_memory.c        |   2 +-
 mm/memory.c             |   2 +-
 mm/migrate.c            | 126 ++++++++++++++++++----------------------
 4 files changed, 62 insertions(+), 72 deletions(-)

-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ