From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 10:47:33 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84D8337B40A; Mon, 21 Jul 2003 10:47:28 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9B8D43F85; Mon, 21 Jul 2003 10:47:27 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfmrb.dialup.mindspring.com ([165.247.219.107] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19eekv-0002nK-00; Mon, 21 Jul 2003 10:47:26 -0700 Message-ID: <3F1C26CA.9F2AE361@mindspring.com> Date: Mon, 21 Jul 2003 10:45:46 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4544062055edda48ac8dafe9cec895b7b548b785378294e88350badd9bab72f9c350badd9bab72f9c cc: deischen@freebsd.org cc: freebsd-hackers@freebsd.org cc: Marc Ramirez Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 17:47:39 -0000 Robert Watson wrote: > Of these approaches, my favorite are writing directly to a file, and using > a psuedo-device, depending on the requirements. They have fairly > well-defined security semantics (especially if you properly cache the > open-time credentials in the file case). I don't really like the Fifo > case as it has to re-look-up the fifo each time, and has some odd blocking > semantics. Sockets, as I said, involve a lot of special casing, so unless > you're already dealing with network code, you probably don't want to drag > it into the mix. If you're creating big new infrastructure for a feature, > I suppose you could also hook it up as a first class object at the file > descriptor level, in the style of kqueue. If it's relatively minor event > data, you could hook up a new kqueue event type. You could also just use > a special-purpose system call or sysctl if you don't mind a lot of context > switching and lack of buffering. I like setting the PG_G bit on the page involved, which maps it into the address space of all processes. 8-). -- Terry