Re: [patch V2 1/9] softirq: Add RT specific softirq accounting

From: Frederic Weisbecker
Date: Mon Dec 07 2020 - 08:07:37 EST


On Fri, Dec 04, 2020 at 06:01:52PM +0100, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> RT requires the softirq processing and local bottomhalf disabled regions to
> be preemptible. Using the normal preempt count based serialization is
> therefore not possible because this implicitely disables preemption.
>
> RT kernels use a per CPU local lock to serialize bottomhalfs. As
> local_bh_disable() can nest the lock can only be acquired on the outermost
> invocation of local_bh_disable() and released when the nest count becomes
> zero. Tasks which hold the local lock can be preempted so its required to
> keep track of the nest count per task.
>
> Add a RT only counter to task struct and adjust the relevant macros in
> preempt.h.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>