linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: hughd@google.com, willy@infradead.org, mgorman@suse.de,
	muchun.song@linux.dev, akpm@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] asynchronously scan and free empty user PTE pages
Date: Mon, 17 Jun 2024 19:51:31 +0200	[thread overview]
Message-ID: <fbd652ad-2f3f-4fa7-9a4c-96e0876b6397@redhat.com> (raw)
In-Reply-To: <24480cd6-0a13-4534-8d64-4517e73f0070@bytedance.com>

On 14.06.24 05:32, Qi Zheng wrote:
> Hi David,
> 
> How about starting with this:
> 
> a. for MADV_DONTNEED case, try synchronous reclaim as you said
> b. for MADV_FREE case, add a madvise(MADV_PT_RECLAIM) option to mark
>      this vma, then add its corresponding mm to a global list, and then
>      traverse the list and reclaim it when the memory is tight and enters
>      the system reclaim path.
> 
>      (If this option is for synchronous reclaim as you said, then the
>       user-mode program may need to start a thread to make a cyclic call.
>       I'm not sure if this usage makes sense. If so, I can also implement
>       such an option.)
> c. for s390 case you mentioned, maybe we can set a CONFIG_FREE_PT first,
>      and then s390 will not select this config until the problem is solved.

CONFIG_PT_RECLAIM or sth. like that, that would depend on 
CONFIG_ARCH_SUPPORTS_PT_RECLAIM.

Then we can start with what we know works and was tested (e.g., x86).

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2024-06-17 17:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13  8:38 Qi Zheng
2024-06-13  8:38 ` [RFC PATCH 1/3] mm: pgtable: move pte_free_defer() out of CONFIG_TRANSPARENT_HUGEPAGE Qi Zheng
2024-06-13  8:38 ` [RFC PATCH 2/3] mm: pgtable: make pte_offset_map_nolock() return pmdval Qi Zheng
2024-06-13  8:38 ` [RFC PATCH 3/3] mm: free empty user PTE pages Qi Zheng
2024-06-13  9:04 ` [RFC PATCH 0/3] asynchronously scan and " David Hildenbrand
2024-06-13  9:32   ` Qi Zheng
2024-06-13 10:25     ` David Hildenbrand
2024-06-13 11:59       ` Qi Zheng
2024-06-14  3:32         ` Qi Zheng
2024-06-17 17:51           ` David Hildenbrand [this message]
2024-06-18  7:52             ` Qi Zheng
2024-06-14  7:53         ` David Hildenbrand
2024-06-14 10:49           ` Qi Zheng
2024-06-17 17:49             ` David Hildenbrand
2024-06-18  7:51               ` Qi Zheng
2024-06-18  9:40                 ` David Hildenbrand
2024-06-18  9:55                   ` Qi Zheng

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=fbd652ad-2f3f-4fa7-9a4c-96e0876b6397@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=muchun.song@linux.dev \
    --cc=willy@infradead.org \
    --cc=zhengqi.arch@bytedance.com \
    /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