lkml.org 
[lkml]   [2020]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 7/9] task_isolation: don't interrupt CPUs with tick_nohz_full_kick_cpu()
    Date
    From: Yuri Norov <ynorov@marvell.com>

    For nohz_full CPUs the desirable behavior is to receive interrupts
    generated by tick_nohz_full_kick_cpu(). But for hard isolation it's
    obviously not desirable because it breaks isolation.

    This patch adds check for it.

    Signed-off-by: Yuri Norov <ynorov@marvell.com>
    [abelits@marvell.com: updated, only exclude CPUs running isolated tasks]
    Signed-off-by: Alex Belits <abelits@marvell.com>
    ---
    kernel/time/tick-sched.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
    index a213952541db..6c8679e200f0 100644
    --- a/kernel/time/tick-sched.c
    +++ b/kernel/time/tick-sched.c
    @@ -20,6 +20,7 @@
    #include <linux/sched/clock.h>
    #include <linux/sched/stat.h>
    #include <linux/sched/nohz.h>
    +#include <linux/isolation.h>
    #include <linux/module.h>
    #include <linux/irq_work.h>
    #include <linux/posix-timers.h>
    @@ -268,7 +269,8 @@ static void tick_nohz_full_kick(void)
    */
    void tick_nohz_full_kick_cpu(int cpu)
    {
    - if (!tick_nohz_full_cpu(cpu))
    + smp_rmb();
    + if (!tick_nohz_full_cpu(cpu) || task_isolation_on_cpu(cpu))
    return;

    irq_work_queue_on(&per_cpu(nohz_full_kick_work, cpu), cpu);
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-11-23 19:03    [W:4.255 / U:0.168 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site