From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Huang, Ying" <ying.huang@intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Gao Xiang <xiang@kernel.org>
Subject: Re: [PATCH] mm/migrate: fix deadlock in migrate_pages_batch() on large folios
Date: Fri, 16 Aug 2024 13:12:35 +0800 [thread overview]
Message-ID: <aa5ac560-1dcc-45b6-8e24-0e9cb59feb18@linux.alibaba.com> (raw)
In-Reply-To: <20240815220224.d7970835d5c12b4833bd04dc@linux-foundation.org>
Hi Andrew,
On 2024/8/16 13:02, Andrew Morton wrote:
> On Mon, 29 Jul 2024 09:58:02 +0800 Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
>
>>> For the fix, I think that we should still respect migrate_mode because
>>> users may prefer migration success over blocking.
>>>
>>> @@ -1492,11 +1492,17 @@ static int unmap_and_move_huge_page(new_folio_t get_new_folio,
>>> return rc;
>>> }
>>>
>>> -static inline int try_split_folio(struct folio *folio, struct list_head *split_folios)
>>> +static inline int try_split_folio(struct folio *folio, struct list_head *split_folios,
>>> + enum migrate_mode mode)
>>> {
>>> int rc;
>>>
>>> - folio_lock(folio);
>>> + if (mode == MIGRATE_ASYNC) {
>>> + if (!folio_trylock(folio))
>>> + return -EAGAIN;
>>> + } else {
>>> + folio_lock(folio);
>>> + }
>>> rc = split_folio_to_list(folio, split_folios);
>>> folio_unlock(folio);
>>> if (!rc)
>>
>> Okay, yeah it looks better since it seems I missed the fallback
>> part in migrate_pages_sync().
>>
>> Let me send the next version to follow your advice, thanks.
>
> The author seems to have disappeared. Should we merge this as-is or
> does someone want to take a look at developing a v2?
I've replied your email last week, I'm not sure why it has not
been addressed?
https://lore.kernel.org/linux-mm/20240729021306.398286-1-hsiangkao@linux.alibaba.com/
The patch in your queue is already v2? No?
Thanks,
Gao Xiang
next prev parent reply other threads:[~2024-08-16 5:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-28 15:49 Gao Xiang
2024-07-28 19:50 ` Andrew Morton
2024-07-28 21:17 ` Matthew Wilcox
2024-07-28 22:35 ` Gao Xiang
2024-07-28 21:46 ` Matthew Wilcox
2024-07-28 22:11 ` Gao Xiang
2024-08-02 9:01 ` Gao Xiang
2024-07-29 1:38 ` Huang, Ying
2024-07-29 1:58 ` Gao Xiang
2024-08-16 5:02 ` Andrew Morton
2024-08-16 5:12 ` Gao Xiang [this message]
2024-08-16 5:17 ` Gao Xiang
2024-08-16 5:25 ` Andrew Morton
2024-08-16 5:32 ` Gao Xiang
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=aa5ac560-1dcc-45b6-8e24-0e9cb59feb18@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xiang@kernel.org \
--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