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

Re: [RFC PATCH 7/8] hugetlb: add update_and_free_page_no_sleep for irq context

From: Hillf Danton <hidden>
Date: 2021-03-20 01:19:17

On Fri, 19 Mar 2021 15:42:08 -0700  Mike Kravetz wrote:
+
+	if (!can_sleep && free_page_may_sleep(h, page)) {
+		/*
+		 * Send page freeing to workqueue
+		 *
+		 * Only call schedule_work() if hpage_freelist is previously
+		 * empty. Otherwise, schedule_work() had been called but the
+		 * workfn hasn't retrieved the list yet.
+		 */
+		if (llist_add((struct llist_node *)&page->mapping,
+					&hpage_freelist))
+			schedule_work(&free_hpage_work);
+		return;
+	}
Queue work on system_unbound_wq instead of system_wq because of blocking work.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help