[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878rm42rvq.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Wed, 28 Sep 2022 09:46:01 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Bharata B Rao <bharata@....com>
Cc: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Zi Yan <ziy@...dia.com>, Yang Shi <shy828301@...il.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Oscar Salvador" <osalvador@...e.de>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [RFC 0/6] migrate_pages(): batch TLB flushing
Bharata B Rao <bharata@....com> writes:
> On 9/23/2022 1:22 PM, Huang, Ying wrote:
>> Bharata B Rao <bharata@....com> writes:
>>>
>>> Thanks for the patchset. I find it hitting the following BUG() when
>>> running mmtests/autonumabench:
>>>
>>> kernel BUG at mm/migrate.c:2432!
>>>
>>> This is BUG_ON(!list_empty(&migratepages)) in migrate_misplaced_page().
>>
>> Thank you very much for reporting! I haven't reproduced this yet. But
>> I will pay special attention to this when develop the next version, even
>> if I cannot reproduce this finally.
>
> The following change fixes the above reported BUG_ON().
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index a0de0d9b4d41..c11dd82245e5 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1197,7 +1197,7 @@ static int migrate_page_unmap(new_page_t get_new_page, free_page_t put_new_page,
> * references and be restored.
> */
> /* restore the page to right list. */
> - if (rc != -EAGAIN)
> + if (rc == -EAGAIN)
> ret = NULL;
>
> migrate_page_undo_page(page, page_was_mapped, anon_vma, locked, ret);
>
> The pages that returned from unmapping stage with -EAGAIN used to
> end up on "ret" list rather than continuing on the "from" list.
Yes. You are right. Thank you very much!
Digging some history, it is found that the code was correct in previous
versions, but became wrong for mistake during code rebasing. Will be
more careful in the future and try to organize the patchset better to
make it easier to review the changes.
Best Regards,
Huang, Ying
Powered by blists - more mailing lists