linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Zhiguo Jiang <justinjiang@vivo.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Barry Song <baohua@kernel.org>,
	David Hildenbrand <david@redhat.com>,
	Matthew Wilcox <willy@infradead.org>,
	opensource.kernel@vivo.com
Subject: Re: [PATCH v7] mm: shrink skip folio mapped by an exiting process
Date: Tue, 9 Jul 2024 14:23:12 -0700	[thread overview]
Message-ID: <20240709142312.372b20d49c6a97ecd2cd9904@linux-foundation.org> (raw)
In-Reply-To: <20240709123115.117-1-justinjiang@vivo.com>

On Tue,  9 Jul 2024 20:31:15 +0800 Zhiguo Jiang <justinjiang@vivo.com> wrote:

> The releasing process of the non-shared anonymous folio mapped solely by
> an exiting process may go through two flows: 1) the anonymous folio is
> firstly is swaped-out into swapspace and transformed into a swp_entry
> in shrink_folio_list; 2) then the swp_entry is released in the process
> exiting flow. This will result in the high cpu load of releasing a
> non-shared anonymous folio mapped solely by an exiting process.
> 
> When the low system memory and the exiting process exist at the same
> time, it will be likely to happen, because the non-shared anonymous
> folio mapped solely by an exiting process may be reclaimed by
> shrink_folio_list.
> 
> This patch is that shrink skips the non-shared anonymous folio solely
> mapped by an exting process and this folio is only released directly in
> the process exiting flow, which will save swap-out time and alleviate
> the load of the process exiting. 

It would be helpful to provide some before-and-after runtime
measurements, please.  It's a performance optimization so please let's
see what effect it has.


  parent reply	other threads:[~2024-07-09 21:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 12:31 Zhiguo Jiang
2024-07-09 13:02 ` Barry Song
2024-07-10  1:46   ` zhiguojiang
2024-07-10  2:00     ` Barry Song
2024-07-09 21:23 ` Andrew Morton [this message]
2024-07-10  3:32   ` Barry Song
2024-07-10  3:59     ` David Hildenbrand
2024-07-10  4:02       ` Barry Song
2024-07-10  4:04         ` David Hildenbrand
2024-07-10  4:44           ` Barry Song
2024-07-10  6:47             ` zhiguojiang
2024-07-10  7:11               ` Barry Song
2024-07-10  8:38                 ` zhiguojiang
2024-07-10  2:12 ` Barry Song
2024-07-10  2:41   ` zhiguojiang

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=20240709142312.372b20d49c6a97ecd2cd9904@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=david@redhat.com \
    --cc=justinjiang@vivo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=opensource.kernel@vivo.com \
    --cc=willy@infradead.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