svn commit: r299933 - in head/sys: compat/linuxkpi/common/include/linux sys

Hans Petter Selasky hps at selasky.org
Mon May 16 17:28:46 UTC 2016


On 05/16/16 18:51, Ngie Cooper (yaneurabeya) wrote:
>
>> On May 16, 2016, at 09:47, Hans Petter Selasky <hps at selasky.org> wrote:
>>
>> On 05/16/16 18:31, Ngie Cooper (yaneurabeya) wrote:
>>> Dumb question — couldn’t we run the check without locking Giant, then delete the child, e.g.
>>>
>>> if (bsddev != NULL) {
>>>    mtx_lock(&Giant);
>>>    device_delete_child(device_get_parent(bsddev), bsddev);
>>>    mtx_unlock(&Giant);
>>> }
>>> put_device(dev);
>>
>> I guess so. Does it make a difference for you?
>
> First off, how often does the bsddev == NULL case occur?
>
> If it doesn’t occur often, doing this increases contention on Giant unnecessarily…

In general this piece of code is called very rarely. I'll look into it.

--HPS



More information about the svn-src-head mailing list