Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2012 22:46:28 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: ttydev_cdevsw has no d_purge
Message-ID:  <CAJOYFBBPBva6KUvX7dxgDRD_Y3uH=OkWx6MCAh4pUWdGXCi6dg@mail.gmail.com>
In-Reply-To: <201208081941.17860.hselasky@c2i.net>
References:  <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208081827.53824.hselasky@c2i.net> <CAJOYFBD4DxL8ZAeKDYZwtv2FaqcV0Taw%2BLES5nc6Ry_t%2BuzfOw@mail.gmail.com> <201208081941.17860.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hans,

2012/8/8 Hans Petter Selasky <hselasky@c2i.net>:
> Are you sure that the new softc won't be used in any callbacks when
> tty_rel_gone() is called, except for tsw_free() ?

Yes. Otherwise you would have already seen a kernel panic. See
/sys/sys/ttydevsw.h; it has assertions on the locking.

> It is like a drain state, where a unit is collected for free, and then
> committed to free state when the tsw_free() is called. In the [unlocked] time
> in between the unit cannot be re-used.

How is this different from calling alloc/free directly? Why would it
need to go through this `drain' state?

-- 
Ed Schouten <ed@80386.nl>



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