Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Sep 2022 16:11:40 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: kernel-side thread stack swapping
Message-ID:  <CAGudoHGbomDGPNsYa_RHGS7NkWU4iOBHnxr9bCnvfn8BYMjEJQ@mail.gmail.com>
In-Reply-To: <YxINyjnFDt8kU41j@kib.kiev.ua>
References:  <CAGudoHFh5H721kcQT0zDdErD%2Bj%2B0YA6Hz=%2Bjarg9R1jdttfx-A@mail.gmail.com> <YxINyjnFDt8kU41j@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/2/22, Konstantin Belousov <kostikbel@gmail.com> wrote:
> On Fri, Sep 02, 2022 at 02:05:37PM +0200, Mateusz Guzik wrote:
>> Is this really of practical use today?
>>
>> I have a WIP patch which needs to temporarily store something on the
>> stack and should things go wrong enough it will be accessed by UMA,
>> which can't handle the fault nor decide to skip the access.
>>
>> I can add something like td_pinstack or whatever to keep it around,
>> but perhaps the entire machinery can be just whacked?
> p_hold already does that.
>

I only need to protect the one stack and more importantly don't want
to take the proc lock to bump p_hold (nor convert it to atomics), it's
all thread-local so to speak.

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHGbomDGPNsYa_RHGS7NkWU4iOBHnxr9bCnvfn8BYMjEJQ>