Questions about locking; turnstiles and sleeping threads

Adrian Chadd adrian at freebsd.org
Thu Nov 13 09:09:45 UTC 2014


On 13 November 2014 00:59, Alfred Perlstein <alfred at freebsd.org> wrote:
>
> On 11/12/14, 11:25 PM, Adrian Chadd wrote:
>>
>> On 12 November 2014 19:48, Adrian Chadd <adrian at freebsd.org> wrote:
>>>
>>> kan pointed out that we should likely do a WITNESS_WARN() in the
>>> relevant spots in the callout code so we catch these before it
>>> happens.
>>>
>>> I'll see what we can add to -HEAD to be pro-active about it.
>>
>> Amusingly, I tried adding it and it made my laptop turn to soup very
>> quickly - among other things, the TCP timer callouts are all setup
>> with non sleep locks held.
>>
>
> Howso?  You only have to worry about callout_drain(), most other callout
> functions should be safe-ish....

yeah, except for all the places where they drain the timer once
something happens so it doesn't fire.

:)



-adrian


More information about the freebsd-arch mailing list