Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag

From: peterz
Date: Thu Aug 13 2020 - 14:31:38 EST


On Thu, Aug 13, 2020 at 09:29:04AM -0700, Paul E. McKenney wrote:
> OK. So the current situation requires a choice between these these
> alternatives, each of which has shortcomings that have been mentioned
> earlier in this thread:
>
> 1. Prohibit invoking allocators from raw atomic context, such
> as when holding a raw spinlock.

This! This has always been the case, why are we even considering change
here?

> 2. Adding a GFP_ flag.

The patch 1/2 in this thread is horrendous crap.

> 3. Reusing existing GFP_ flags/values/whatever to communicate
> the raw-context information that was to be communicated by
> the new GFP_ flag.
>
> 4. Making lockdep forgive acquiring spinlocks while holding
> raw spinlocks, but only in CONFIG_PREEMPT_NONE=y kernels.
>
> Am I missing anything?

How would 4 solve anything?


In other words, what is the actual friggin problem? I've not seen one
described anywhere.