In message: [linux-yocto][v5.4/standard/preempt-rt/base][PATCH 1/1] mm: do not 
warn for suspend when allocate memory on RT
on 10/04/2020 Liwei Song wrote:

> Interrupts are off during resume from RAM, this will triger a warning
> when allocate memory in non-preemptible context on RT since commit
> 0efa03618228 ("mm: Warn on memory allocation in non-preemptible
> context on RT"), exclude suspend from this warning check.
> 
> Fixes: 0efa03618228 ("mm: Warn on memory allocation in non-preemptible 
> context on RT")
> Signed-off-by: Liwei Song <[email protected]>

merged

Bruce

> ---
>  mm/slub.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index c3f278fdb7d6..6c8c57a2491b 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2751,7 +2751,7 @@ static __always_inline void *slab_alloc_node(struct 
> kmem_cache *s,
>       unsigned long tid;
>  
>       if (IS_ENABLED(CONFIG_PREEMPT_RT) && 
> IS_ENABLED(CONFIG_DEBUG_ATOMIC_SLEEP))
> -             WARN_ON_ONCE(!preemptible() && system_state >= 
> SYSTEM_SCHEDULING);
> +             WARN_ON_ONCE(!preemptible() && system_state >= 
> SYSTEM_SCHEDULING && system_state != SYSTEM_SUSPEND);
>  
>       s = slab_pre_alloc_hook(s, gfpflags);
>       if (!s)
> @@ -3216,7 +3216,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t 
> flags, size_t size,
>       int i;
>  
>       if (IS_ENABLED(CONFIG_PREEMPT_RT) && 
> IS_ENABLED(CONFIG_DEBUG_ATOMIC_SLEEP))
> -             WARN_ON_ONCE(!preemptible() && system_state >= 
> SYSTEM_SCHEDULING);
> +             WARN_ON_ONCE(!preemptible() && system_state >= 
> SYSTEM_SCHEDULING && system_state != SYSTEM_SUSPEND);
>  
>       /* memcg and kmem_cache debug support */
>       s = slab_pre_alloc_hook(s, flags);
> -- 
> 2.24.1
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8597): 
https://lists.yoctoproject.org/g/linux-yocto/message/8597
Mute This Topic: https://lists.yoctoproject.org/mt/72919284/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to