From owner-freebsd-current@FreeBSD.ORG Wed Aug 8 20:46:28 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3B741065674 for ; Wed, 8 Aug 2012 20:46:28 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 846218FC15 for ; Wed, 8 Aug 2012 20:46:28 +0000 (UTC) Received: by obbun3 with SMTP id un3so2187425obb.13 for ; Wed, 08 Aug 2012 13:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=IrkxTZ5wPFaU7mR85bm/O3B5Smjjihta+e+h3K2kt4c=; b=A/6VQrVItxI11y3aCb8J9PUZ0ii0GEOkRfWHM8aiz82ZeswjsazmQHmMriP/v56yv8 OC7/JXrxAxg0DXPcwxeDTXhLm+QYojYuaQOSYwYifyyn4maD7VH2LPXCjq892VBQmfD2 tcIxt9a/U8/fLjYHb/gSrYeJ6/TspHWQ1JkOazKsEU3r4EjyybREGCa2IeJuRTzTbDTV hFFu369pQXqzBYiUp/WC1fJnPBoiZFLMFuF7w305f0QedilT6/m16U8PHIKs6o80vTyc fYT3WzqY02yeJK2Za/RFay8s6zzrjax1WEPRadSeK+l786e0iTjBgkNkYs4jk8lOqdaU DccA== MIME-Version: 1.0 Received: by 10.182.17.42 with SMTP id l10mr1752174obd.52.1344458788085; Wed, 08 Aug 2012 13:46:28 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.153.195 with HTTP; Wed, 8 Aug 2012 13:46:28 -0700 (PDT) In-Reply-To: <201208081941.17860.hselasky@c2i.net> References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208081827.53824.hselasky@c2i.net> <201208081941.17860.hselasky@c2i.net> Date: Wed, 8 Aug 2012 22:46:28 +0200 X-Google-Sender-Auth: iebfLDvAkTCky4ZawBH1m6WH8sw Message-ID: From: Ed Schouten To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , freebsd-current@freebsd.org Subject: Re: ttydev_cdevsw has no d_purge X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2012 20:46:28 -0000 Hi Hans, 2012/8/8 Hans Petter Selasky : > 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