lkml.org 
[lkml]   [2022]   [Mar]   [9]   [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 Thu, 10 Mar 2022 10:48:41 +0800 wangjianxing <wangjianxing@loongson.cn> wrote:

> spin_lock will preempt_disable(), interrupt context will
> __irq_enter/local_bh_disable and also add preempt count with offset.
>
> cond_resched check whether if preempt_count == 0 in first and won't
> schedule in previous context.
>
> Is this right?
>
>
> With another way, could we add some condition to avoid call cond_resched
> in interrupt context or spin_lock()?
>
> + if (preemptible())
> +       cond_resched();
>

None of this works with CONFIG_PREEMPTION=n.

\
 
 \ /
  Last update: 2022-03-10 04:30    [W:0.059 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site