Re: [PATCH 7/7] mm/page_alloc: Replace local_lock with normal spinlock
From: Yu Zhao
Date: Wed Jun 15 2022 - 18:43:44 EST
On Mon, Jun 13, 2022 at 8:54 AM Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> wrote:
...
> +#define pcpu_spin_trylock_irqsave(type, member, ptr, flags) \
> +({ \
> + type *_ret; \
> + pcpu_task_pin(); \
> + _ret = this_cpu_ptr(ptr); \
> + if (!spin_trylock_irqsave(&_ret->member, flags)) \
> + _ret = NULL; \
I'm getting "BUG: sleeping function called from invalid context" with
mm-everything-2022-06-14-19-05.
Perhaps missing a pcpu_task_unpin() here?
> + _ret; \
> +})