Re: need_heavy_qs flag for PREEMPT=y kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 11, 2019 at 09:24:31PM -0400, Joel Fernandes wrote:
> On Sun, Aug 11, 2019 at 04:30:24PM -0700, Paul E. McKenney wrote:
[snip]
> > Next question:  Why does rcu_implicit_dynticks_qs() check only for
> > tick_nohz_full_cpu() and not also IS_ENABLED(CONFIG_PREEMPT)?  After
> > all, a nohz_full CPU in a !CONFIG_PREEMPT kernel should be able to
> > rely on cond_resched(), right?
> > 
> > Should this change?  Why or why not?
> 
> Let me think more about this :) I have an answer in mind but I will think a
> bit more about it and responsd :)

It should not change. That's because (as somewhat mentioned in the comments),
some code paths in the kernel check need_resched() before invoking
cond_resched(). So even with PREEMPT=n having the help of cond_resched(), the
cond_resched() may actually not even be invoked.  So in this case, the
resched_cpu() from rcu_implicit_dynticks_qs() does the needful by setting the
rescheduling flags on the CPU, so that cond_resched() on those CPUs actually
get called. Is that a correct analysis?

thanks,

 - Joel




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux