mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org
Cc: chrisl@kernel.org, david@redhat.com, hughd@google.com,
	justinjiang@vivo.com, kaleshsingh@google.com, kasong@tencent.com,
	linux-kernel@vger.kernel.org, ryan.roberts@arm.com,
	v-songbaohua@oppo.com, ying.huang@intel.com
Subject: [PATCH v3 0/2] mm: batch free swaps for zap_pte_range()
Date: Thu,  8 Aug 2024 09:58:57 +1200	[thread overview]
Message-ID: <20240807215859.57491-1-21cnbao@gmail.com> (raw)

From: Barry Song <v-songbaohua@oppo.com>

Batch free swap slots for zap_pte_range(), making munmap three times
faster when the page table entries are filled with swap entries to
be freed. This is likely another advantage of using mTHP.

-v3:
  * collect David's acked-by for patch1/2
  * further refine the code per David;
  * fix a corner case which might leak swap slots, thanks for Kairui's
    comment.
-v2:
  https://lore.kernel.org/all/20240807082508.358322-1-21cnbao@gmail.com/
  * cleanup the name of the instances of swap_info_struct, per
    Andrew, David;
  * refine the code to add fallback in the batch free function,
    Thanks for David's suggestion.
-v1:
  https://lore.kernel.org/all/20240806012409.61962-1-21cnbao@gmail.com/

Barry Song (2):
  mm: rename instances of swap_info_struct to meaningful 'si'
  mm: attempt to batch free swap entries for zap_pte_range()

 mm/swapfile.c | 410 ++++++++++++++++++++++++++++----------------------
 1 file changed, 232 insertions(+), 178 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-08-07 21:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 21:58 Barry Song [this message]
2024-08-07 21:58 ` [PATCH v3 1/2] mm: rename instances of swap_info_struct to meaningful 'si' Barry Song
2024-08-08  0:01   ` Chris Li
2024-08-08  0:21     ` Barry Song
2024-08-08  8:10       ` David Hildenbrand
2024-08-07 21:58 ` [PATCH v3 2/2] mm: attempt to batch free swap entries for zap_pte_range() Barry Song
2024-08-08  8:14   ` David Hildenbrand
2024-08-15 18:29   ` Chris Li
2024-08-15 21:53     ` Barry Song
2024-08-25 20:09       ` Hugh Dickins
2024-08-25 23:52         ` Barry Song

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=20240807215859.57491-1-21cnbao@gmail.com \
    --to=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=hughd@google.com \
    --cc=justinjiang@vivo.com \
    --cc=kaleshsingh@google.com \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=v-songbaohua@oppo.com \
    --cc=ying.huang@intel.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

all inboxes | Powered by JetHome®