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-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 28 Feb 2024 10:52:23 -0500
From: Zi Yan <ziy@...dia.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "\"Pankaj Raghav (Samsung)\"" <kernel@...kajraghav.com>,
 Zi Yan <ziy@...dia.com>, "\"Matthew Wilcox (Oracle)\"" <willy@...radead.org>,
 linux-mm@...ck.org, David Hildenbrand <david@...hat.com>,
 Yang Shi <shy828301@...il.com>, Yu Zhao <yuzhao@...gle.com>,
 "\"Kirill A . Shutemov\"" <kirill.shutemov@...ux.intel.com>,
 Ryan Roberts <ryan.roberts@....com>,
 "Michal Koutný" <mkoutny@...e.com>,
 Roman Gushchin <roman.gushchin@...ux.dev>,
 "\"Zach O'Keefe\"" <zokeefe@...gle.com>, Hugh Dickins <hughd@...gle.com>,
 Luis Chamberlain <mcgrof@...nel.org>, linux-kernel@...r.kernel.org,
 cgroups@...r.kernel.org, linux-fsdevel@...r.kernel.org,
 linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v5 7/8] mm: thp: split huge page to any lower order pages

Hi Andrew,

On 26 Feb 2024, at 15:55, Zi Yan wrote:

> From: Zi Yan <ziy@...dia.com>
>
> To split a THP to any lower order pages, we need to reform THPs on
> subpages at given order and add page refcount based on the new page
> order. Also we need to reinitialize page_deferred_list after removing
> the page from the split_queue, otherwise a subsequent split will
> see list corruption when checking the page_deferred_list again.
>
> Note: Anonymous order-1 folio is not supported because _deferred_list,
> which is used by partially mapped folios, is stored in subpage 2 and an
> order-1 folio only has subpage 0 and 1. File-backed order-1 folios are
> fine, since they do not use _deferred_list.
>
> Signed-off-by: Zi Yan <ziy@...dia.com>
> ---
>  include/linux/huge_mm.h |  21 +++++---
>  mm/huge_memory.c        | 110 +++++++++++++++++++++++++++++++---------
>  2 files changed, 99 insertions(+), 32 deletions(-)
>

Can you fold the fixup below into this patch (per discussion with Ryan at [1])? Thanks.

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 50d146eb248f..fd745bcc97ff 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3059,11 +3059,8 @@ int split_huge_page_to_list_to_order(struct page *page, struct list_head *list,

        if (new_order) {
                /* Only swapping a whole PMD-mapped folio is supported */
-               if (folio_test_swapcache(folio)) {
-                       VM_WARN_ONCE(1,
-                               "Cannot split swap-cached folio to non-0 order");
+               if (folio_test_swapcache(folio))
                        return -EINVAL;
-               }
                /* Split shmem folio to non-zero order not supported */
                if (shmem_mapping(folio->mapping)) {
                        VM_WARN_ONCE(1,


[1] https://lore.kernel.org/linux-mm/408df79a-130e-43cd-a21a-9b3a2ddef617@arm.com/

--
Best Regards,
Yan, Zi

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ