Thread (45 messages) 45 messages, 6 authors, 2021-03-25

Re: [RFC PATCH 6/8] hugetlb: make free_huge_page irq safe

From: Michal Hocko <mhocko@suse.com>
Date: 2021-03-22 14:36:29
Also in: lkml

On Fri 19-03-21 15:42:07, Mike Kravetz wrote:
Commit c77c0a8ac4c5 ("mm/hugetlb: defer freeing of huge pages if in
non-task context") was added to address the issue of free_huge_page
being called from irq context.  That commit hands off free_huge_page
processing to a workqueue if !in_task.  However, as seen in [1] this
does not cover all cases.  Instead, make the locks taken in the
free_huge_page irq safe.

This patch does the following:
- Make hugetlb_lock irq safe.  This is mostly a simple process of
  changing spin_*lock calls to spin_*lock_irq* calls.
- Make subpool lock irq safe in a similar manner.
- Revert the !in_task check and workqueue handoff.
This is not sufficient (and 0day bot has captured that already). You
cannot call update_and_free_page from the same context.

-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help