[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220306172121.50d00e8b328a6bd1dea91ee7@linux-foundation.org>
Date: Sun, 6 Mar 2022 17:21:21 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Miaohe Lin <linmiaohe@...wei.com>
Cc: <mike.kravetz@...cle.com>, <shy828301@...il.com>,
<willy@...radead.org>, <ying.huang@...el.com>, <ziy@...dia.com>,
<minchan@...nel.org>, <apopple@...dia.com>,
<ave.hansen@...ux.intel.com>, <o451686892@...il.com>,
<almasrymina@...gle.com>, <jhubbard@...dia.com>,
<rcampbell@...dia.com>, <peterx@...hat.com>,
<naoya.horiguchi@....com>, <mhocko@...e.com>, <riel@...hat.com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 10/16] mm/migration: remove PG_writeback handle in
folio_migrate_flags
On Fri, 4 Mar 2022 17:34:03 +0800 Miaohe Lin <linmiaohe@...wei.com> wrote:
> When newfolio reaches here, it's guaranteed that PG_writeback is not set
> because caller ensures writeback must have been completed. Remove this
> unneeded check and cleanup the relevant comment.
What guarantees that writeback cannot start after the caller has checked?
I see no such check in iomap_migrate_page()?
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -549,18 +549,6 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
> if (!folio_test_hugetlb(folio))
> folio->private = NULL;
>
> - /*
> - * If any waiters have accumulated on the new page then
> - * wake them up.
> - */
> - if (folio_test_writeback(newfolio))
> - folio_end_writeback(newfolio);
> -
> - /*
> - * PG_readahead shares the same bit with PG_reclaim. The above
> - * end_page_writeback() may clear PG_readahead mistakenly, so set the
> - * bit after that.
> - */
> if (folio_test_readahead(folio))
> folio_set_readahead(newfolio);
>
folio_migrate_flags() and folio_migrate_copy() are global,
export-to-modules functions but have no interface documentation. That
was bad of us.
I wonder why those two functions are exported to modules anyway.
Powered by blists - more mailing lists