From: Huang Ying <ying.huang@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Huang Ying <ying.huang@intel.com>,
Hugh Dickins <hughd@google.com>,
"Xu, Pengfei" <pengfei.xu@intel.com>,
Christoph Hellwig <hch@lst.de>, Stefan Roesch <shr@devkernel.io>,
Tejun Heo <tj@kernel.org>, Xin Hao <xhao@linux.alibaba.com>,
Zi Yan <ziy@nvidia.com>, Yang Shi <shy828301@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Matthew Wilcox <willy@infradead.org>,
Mike Kravetz <mike.kravetz@oracle.com>
Subject: [PATCH 0/3] migrate_pages: fix deadlock in batched synchronous migration
Date: Fri, 24 Feb 2023 22:11:42 +0800 [thread overview]
Message-ID: <20230224141145.96814-1-ying.huang@intel.com> (raw)
Two deadlock bugs were reported for the migrate_pages() batching
series. Thanks Hugh and Pengfei. Analysis shows that if we have
locked some other folios except the one we are migrating, it's not
safe in general to wait synchronously, for example, to wait the
writeback to complete or wait to lock the buffer head.
So 1/3 fixes the deadlock in a simple way, where the batching support
for the synchronous migration is disabled. The change is
straightforward and easy to be understood. While 3/3 re-introduce the
batching for synchronous migration via trying to migrate
asynchronously in batch optimistically, then fall back to migrate
synchronously one by one for fail-to-migrate folios. Test shows that
this can restore the TLB flushing batching performance for synchronous
migration effectively.
Best Regards,
Huang, Ying
next reply other threads:[~2023-02-24 14:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 14:11 Huang Ying [this message]
2023-02-24 14:11 ` [PATCH 1/3] migrate_pages: fix deadlock in batched migration Huang Ying
2023-02-28 6:13 ` Hugh Dickins
2023-02-28 7:22 ` Huang, Ying
2023-02-28 21:07 ` Hugh Dickins
2023-03-01 1:17 ` Huang, Ying
2023-02-24 14:11 ` [PATCH 2/3] migrate_pages: move split folios processing out of migrate_pages_batch() Huang Ying
2023-03-01 2:23 ` Baolin Wang
2023-03-01 6:35 ` Huang, Ying
2023-03-01 11:07 ` Baolin Wang
2023-02-24 14:11 ` [PATCH 3/3] migrate_pages: try migrate in batch asynchronously firstly Huang Ying
2023-02-28 6:36 ` Hugh Dickins
2023-02-28 7:45 ` Huang, Ying
2023-02-28 21:22 ` Hugh Dickins
2023-03-01 6:08 ` Huang, Ying
2023-03-01 6:46 ` Hugh Dickins
2023-03-01 7:10 ` Huang, Ying
2023-03-01 3:08 ` Baolin Wang
2023-03-01 6:18 ` Huang, Ying
2023-03-01 11:03 ` Baolin Wang
2023-02-26 4:55 ` [PATCH 0/3] migrate_pages: fix deadlock in batched synchronous migration Andrew Morton
2023-02-27 1:25 ` Huang, Ying
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=20230224141145.96814-1-ying.huang@intel.com \
--to=ying.huang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=hch@lst.de \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=pengfei.xu@intel.com \
--cc=shr@devkernel.io \
--cc=shy828301@gmail.com \
--cc=tj@kernel.org \
--cc=willy@infradead.org \
--cc=xhao@linux.alibaba.com \
--cc=ziy@nvidia.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®