From: Matthew Wilcox <willy@infradead.org>
To: Barry Song <21cnbao@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org, chrisl@kernel.org,
david@redhat.com, hanchuanhua@oppo.com, hughd@google.com,
linux-kernel@vger.kernel.org, mhocko@suse.com,
ryan.roberts@arm.com, shy828301@gmail.com, v-songbaohua@oppo.com,
wangkefeng.wang@huawei.com, xiang@kernel.org,
ying.huang@intel.com, yuzhao@google.com
Subject: Re: [PATCH v2] mm: hold PTL from the first PTE while reclaiming a large folio
Date: Tue, 26 Mar 2024 16:21:01 +0000 [thread overview]
Message-ID: <ZgL17TSjiUtrmzk8@casper.infradead.org> (raw)
In-Reply-To: <20240306095219.71086-1-21cnbao@gmail.com>
On Wed, Mar 06, 2024 at 10:52:19PM +1300, Barry Song wrote:
> if (folio_test_pmd_mappable(folio))
> flags |= TTU_SPLIT_HUGE_PMD;
> + /*
> + * Without TTU_SYNC, try_to_unmap will only begin to hold PTL
> + * from the first present PTE within a large folio. Some initial
> + * PTEs might be skipped due to races with parallel PTE writes
> + * in which PTEs can be cleared temporarily before being written
> + * new present values. This will lead to a large folio is still
> + * mapped while some subpages have been partially unmapped after
> + * try_to_unmap; TTU_SYNC helps try_to_unmap acquire PTL from the
> + * first PTE, eliminating the influence of temporary PTE values.
> + */
Please wrap comments at <80 columns. The easiest way to do this is just
to pipe the block of text through "fmt -p \*" (need to quote the * to
prevent it from being a glob/regex)
prev parent reply other threads:[~2024-03-26 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 9:52 Barry Song
2024-03-26 16:10 ` David Hildenbrand
2024-03-26 16:17 ` Ryan Roberts
2024-03-26 22:04 ` Barry Song
2024-03-26 16:21 ` Matthew Wilcox [this message]
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=ZgL17TSjiUtrmzk8@casper.infradead.org \
--to=willy@infradead.org \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=hanchuanhua@oppo.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=ryan.roberts@arm.com \
--cc=shy828301@gmail.com \
--cc=v-songbaohua@oppo.com \
--cc=wangkefeng.wang@huawei.com \
--cc=xiang@kernel.org \
--cc=ying.huang@intel.com \
--cc=yuzhao@google.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