lkml.org 
[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] mm/page_alloc: add scheduling point to free_unref_page_list
On Tue, Mar 01, 2022 at 08:38:25PM -0500, wangjianxing wrote:
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 3589febc6..1b96421c8 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3479,6 +3479,9 @@ void free_unref_page_list(struct list_head *list)
> */
> if (++batch_count == SWAP_CLUSTER_MAX) {
> local_unlock_irqrestore(&pagesets.lock, flags);
> +
> + cond_resched();

This isn't safe. This path can be called from interrupt context
(otherwise we'd be using local_unlock_irq() instead of irqrestore()).

\
 
 \ /
  Last update: 2022-03-08 17:21    [W:0.089 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site