[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y12c4428.ffs@tglx>
Date: Fri, 25 Oct 2024 17:04:15 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Dirk Behme
<dirk.behme@...il.com>, Lyude Paul <lyude@...hat.com>,
rust-for-linux@...r.kernel.org, Danilo Krummrich <dakr@...hat.com>,
airlied@...hat.com, Ingo Molnar <mingo@...hat.com>, will@...nel.org,
Waiman Long <longman@...hat.com>, linux-kernel@...r.kernel.org, Miguel
Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
wedsonaf@...il.com, Gary Guo <gary@...yguo.net>, Björn Roy
Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, Andreas
Hindborg <a.hindborg@...sung.com>, aliceryhl@...gle.com, Trevor Gross
<tmgross@...ch.edu>
Subject: Re: [POC 1/6] irq & spin_lock: Add counted interrupt
disabling/enabling
On Thu, Oct 24 2024 at 14:57, Boqun Feng wrote:
> On Thu, Oct 24, 2024 at 07:22:19PM +0200, Thomas Gleixner wrote:
>> On Thu, Oct 24 2024 at 12:05, Peter Zijlstra wrote:
>> > That is my only concern -- making insane code crash hard is good, making
>> > it silently mostly work but cause random weirdness is not.
>>
>> I wish we could come up with a lightweight check for that.
>>
> Since the preempt part takes exactly one byte in the preempt counter,
> maybe we could use a "incb + jo"?
>
> For example as below, note that since I used OF here, so it will try the
> byte as s8 therefore overflow at 128, so 127 is the max level of
> nesting.
>
> Would this be a relatively lightweight check?
That's definitely an interesting thought, though it adds a conditional
into preempt_disable(). We should try and see whether it's significant.
Thanks,
tglx
Powered by blists - more mailing lists