linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Xu Yu <xuyu@linux.alibaba.com>
To: linux-mm@kvack.org
Cc: david@redhat.com
Subject: [PATCH v2 0/2] attempt to map anonymous pte-mapped THPs by pmds
Date: Thu,  7 Dec 2023 11:09:44 +0800	[thread overview]
Message-ID: <cover.1701917546.git.xuyu@linux.alibaba.com> (raw)
In-Reply-To: <cover.1699865107.git.xuyu@linux.alibaba.com>

Result of tools/testing/selftests/mm/cow.c tests:
# [RUN] Basic COW after fork() when collapsing before fork()
ok 145 No leak from parent into child
# [RUN] Basic COW after fork() when collapsing after fork() (fully shared)
ok 146 No leak from parent into child
# [RUN] Basic COW after fork() when collapsing after fork() (lower shared)
ok 147 No leak from parent into child
# [RUN] Basic COW after fork() when collapsing after fork() (upper shared)
ok 148 No leak from parent into child

Debug messages (simply with printk, will add tracepoints later) show
that THP in case 145 and 146 is remapped with pmd in place.

To be honest, I'm not sure some of the conditions are handled properly,
such as pin and uffd. And I send out this workable patchset to get more
comments. Many thanks!


Changes since v1:
- Deal with PageAnonExclusive properly, as suggested by David.

Xu Yu (2):
  mm/khugepaged: attempt to map anonymous pte-mapped THPs by pmds
  mm/khugepaged: add case for mapping anonymous pte-mapped THPs by pmds

 mm/khugepaged.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 231 insertions(+)

-- 
2.37.1



  parent reply	other threads:[~2023-12-07  3:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13  9:05 [PATCH 0/1] mm/khugepaged: map anonymous pte-mapped THPs by pmds Xu Yu
2023-11-13  9:05 ` [PATCH 1/1] " Xu Yu
2023-11-13  9:26   ` David Hildenbrand
2023-11-13  9:33     ` Xu Yu
2023-11-13 10:10       ` David Hildenbrand
2023-12-07  3:09 ` Xu Yu [this message]
2023-12-07  3:09   ` [PATCH v2 1/2] mm/khugepaged: attempt to " Xu Yu
2023-12-07  7:47     ` Xu Yu
2023-12-07 10:37     ` David Hildenbrand
2023-12-18  2:45       ` Xu Yu
2023-12-07  3:09   ` [PATCH v2 2/2] mm/khugepaged: add case for mapping " Xu Yu
2023-12-18  7:06 ` [PATCH v3 0/2] attempt to map " Xu Yu
2023-12-18  7:06   ` [PATCH v3 1/2] mm/khugepaged: map RO non-exclusive pte-mapped anon " Xu Yu
2023-12-18  7:06   ` [PATCH v3 2/2] mm/khugepaged: map exclusive anonymous pte-mapped " Xu Yu
2023-12-21 20:40   ` [PATCH v3 0/2] attempt to map " Zach O'Keefe
2023-12-21 20:54     ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1701917546.git.xuyu@linux.alibaba.com \
    --to=xuyu@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).