Re: [PATCH v14 062/138] mm/migrate: Add folio_migrate_copy()

From: Dmitry Osipenko
Date: Thu Jul 22 2021 - 07:52:34 EST


15.07.2021 06:35, Matthew Wilcox (Oracle) пишет:
> This is the folio equivalent of migrate_page_copy(), which is retained
> as a wrapper for filesystems which are not yet converted to folios.
> Also convert copy_huge_page() to folio_copy().
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> ---
> include/linux/migrate.h | 1 +
> include/linux/mm.h | 2 +-
> mm/folio-compat.c | 6 ++++++
> mm/hugetlb.c | 2 +-
> mm/migrate.c | 14 +++++---------
> mm/util.c | 6 +++---
> 6 files changed, 17 insertions(+), 14 deletions(-)

Hi,

I'm getting warnings that might be related to this patch.

[37020.191023] BUG: sleeping function called from invalid context at mm/util.c:761
[37020.191383] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 29, name: kcompactd0
[37020.191550] CPU: 1 PID: 29 Comm: kcompactd0 Tainted: G W 5.14.0-rc2-next-20210721-00201-g393e9d2093a1 #8880
[37020.191576] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[37020.191599] [<c010ce15>] (unwind_backtrace) from [<c0108fd5>] (show_stack+0x11/0x14)
[37020.191667] [<c0108fd5>] (show_stack) from [<c0a74b1f>] (dump_stack_lvl+0x2b/0x34)
[37020.191724] [<c0a74b1f>] (dump_stack_lvl) from [<c0141a41>] (___might_sleep+0xed/0x11c)
[37020.191779] [<c0141a41>] (___might_sleep) from [<c0241e07>] (folio_copy+0x3f/0x84)
[37020.191817] [<c0241e07>] (folio_copy) from [<c027a7b1>] (folio_migrate_copy+0x11/0x1c)
[37020.191856] [<c027a7b1>] (folio_migrate_copy) from [<c027ab65>] (__buffer_migrate_page.part.0+0x215/0x238)
[37020.191891] [<c027ab65>] (__buffer_migrate_page.part.0) from [<c027b73d>] (buffer_migrate_page_norefs+0x19/0x28)
[37020.191927] [<c027b73d>] (buffer_migrate_page_norefs) from [<c027affd>] (move_to_new_page+0x4d/0x200)
[37020.191960] [<c027affd>] (move_to_new_page) from [<c027bc91>] (migrate_pages+0x521/0x72c)
[37020.191993] [<c027bc91>] (migrate_pages) from [<c024dbc1>] (compact_zone+0x589/0xb60)
[37020.192031] [<c024dbc1>] (compact_zone) from [<c024e1eb>] (proactive_compact_node+0x53/0x6c)
[37020.192064] [<c024e1eb>] (proactive_compact_node) from [<c024e713>] (kcompactd+0x20b/0x238)
[37020.192096] [<c024e713>] (kcompactd) from [<c013b987>] (kthread+0x123/0x140)
[37020.192134] [<c013b987>] (kthread) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[37020.192164] Exception stack(0xc1751fb0 to 0xc1751ff8)