From owner-freebsd-current@FreeBSD.ORG Wed Nov 30 15:05:13 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B104106566C; Wed, 30 Nov 2011 15:05:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 445508FC15; Wed, 30 Nov 2011 15:05:13 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id F07A246B0A; Wed, 30 Nov 2011 10:05:12 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 824F9B945; Wed, 30 Nov 2011 10:05:12 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 30 Nov 2011 10:05:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <20111130124320.GA1449@azathoth.lan> In-Reply-To: <20111130124320.GA1449@azathoth.lan> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111301005.11938.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 30 Nov 2011 10:05:12 -0500 (EST) Cc: Baptiste Daroussin Subject: Re: [patch] turning devctl into a "multiple openable" device 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, 30 Nov 2011 15:05:13 -0000 On Wednesday, November 30, 2011 7:43:20 am Baptiste Daroussin wrote: > Hi all, > > With the help of cognet, I wrote a patch to turn devctl into a multiple openable > device, that mean that it will allow to open /dev/devctl in multiple programs, > for example hald and everythings that want to receive notification from the > device won't need to depend on haveing devd running. > > here is the patch: > http://people.freebsd.org/~bapt/devctl_multi_open.diff Shouldn't devctl_queue_data_f() use the requested malloc() flags instead of hardcoding M_NOWAIT? Also, I know that it was an intentional design decisison by Warner to have the multiplexing of devctl data done in userland via devd rather than in the kernel. (I think he envisioned devd providing a UNIX domain socket or some such for other daemons to use to listen to events.) Have you asked him about this change? -- John Baldwin