Re: [RFC] sched,livepatch: call klp_try_switch_task in __cond_resched

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

 



On Sun, 2022-05-08 at 22:41 +0200, Peter Zijlstra wrote:
> 
> No, it does what you think it should do, you're just getting confused
> by
> the inverted PREEMPT_NEED_RESCHED bit :-)

Fair enough, that makes sense! Thanks for pointing that out.
That is a very clever optimization.

I suppose that should_resched() check is also something that
KLP could use by periodically poking tasks that get stuck in
the KLP transition (and are running) by simply calling
set_preempt_need_resched(), after which that klp_patch_pending()
check can happen only in the __cond_resched() path where we
already call preempt_schedule_common() anyway?

Is that something that would work, and be low enough overhead
in the general case to be acceptable?





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux