lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <xhsmhcza8waai.mognet@vschneid.remote.csb>
Date:   Mon, 31 Oct 2022 10:35:17 +0000
From:   Valentin Schneider <vschneid@...hat.com>
To:     Ruipeng Qi <qiruipeng@...iang.com>, mingo@...hat.com
Cc:     peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com, linux-kernel@...r.kernel.org,
        ruipengqi7@...il.com, Ruipeng Qi <qiruipeng@...iang.com>
Subject: Re: [PATCH] sched/fair: Change mode of period_timer to
 HRTIMER_MODE_ABS_PINNED_HARD

On 20/10/22 17:17, Ruipeng Qi wrote:
> Previous mode of period_timer is HRTIMER_MODE_ABS_PINNED,which means
> timer callback function will be executed in soft irq context.
>
> When one task group runs out of quota in a period,but holding lock of
> softirq_ctrl,the task will be rescheduled later,and then a system stall
> occurs:
>  - next period comes,
>  - __do_softirq can't acquire lock of softirq_ctrl,
>  - __do_softirq will not be invoked,
>  - callback of period_timer will not be invoked,
>  - task group will not get any quota in any new period.
>  - a system stall occurs.
>
> Changing mode of period_timer to HRTIMER_MODE_ABS_PINNED_HARD,which mean
> timer callback function executed in hard irq context fix this problem.
>

What you want here is some form of PI between the task doing the timer
soft expiry and the one holding the softirq_ctrl.lock. This doesn't happen
ATM because of should_wake_ksoftirqd() - if the lock is held then we won't
wake ksoftirqd, so we won't get a PI.

If you look at the RT stack, this commit gives you that:
c1d68f0da449 ("softirq: Use a dedicated thread for timer wakeups.")
(from linux-6.1.y-rt-rebase)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ