From owner-cvs-all Sun Sep 22 21:24:51 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42F8E37B401; Sun, 22 Sep 2002 21:24:49 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E762943E6E; Sun, 22 Sep 2002 21:24:48 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id C5B32AE147; Sun, 22 Sep 2002 21:24:48 -0700 (PDT) Date: Sun, 22 Sep 2002 21:24:48 -0700 From: Alfred Perlstein To: Juli Mallett Cc: Jeff Roberson , Greg 'groggy' Lehey , Jeff Roberson , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_alq.c src/sys/sys alq.h Message-ID: <20020923042448.GF6262@elvis.mu.org> References: <20020923003727.GM21093@wantadilla.lemis.com> <20020922211607.E43954-100000@mail.chesapeake.net> <20020923020717.GC6262@elvis.mu.org> <20020922202803.A95505@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020922202803.A95505@FreeBSD.org> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Juli Mallett [020922 20:28] wrote: > * De: Alfred Perlstein [ Data: 2002-09-22 ] > [ Subjecte: Re: cvs commit: src/sys/kern kern_alq.c src/sys/sys alq.h ] > > * Jeff Roberson [020922 18:28] wrote: > > > On Mon, 23 Sep 2002, Greg 'groggy' Lehey wrote: > > > > > > > On Sunday, 22 September 2002 at 0:11:14 -0700, Jeff Roberson wrote: > > > > > jeff 2002/09/22 00:11:14 PDT > > > > > > > > > > Added files: > > > > > sys/kern kern_alq.c > > > > > sys/sys alq.h > > > > > Log: > > > > > - Add an asynchronous fixed length record logging mechanism called > > > > > ALQ (Asynch. Logging Queues). ALQ supports many seperate queues with > > > > > different record and buffer sizes. It opens and logs to any vnode so > > > > > it can be used with character devices as well as regular files. > > > > > > > > What's the purpose of this functionality? > > > > > > > > Greg > > > > -- > > > > See complete headers for address and phone numbers > > > > > > > > > > Well, for now it's only used by ktr. I believe that it could be applied > > > to other areas as well. In general I need it for recording long term > > > events such as disk or network activity for post analysis. It could also > > > be useful for diagnosing problems with VFS by logging all VOPs via ktr. > > > > > > It could also be used for logging binary kernel data w/o going through > > > ktr. Any subsystem could create a queue and record it's actions over a > > > long period. ktrace could be implemented on top of an ALQ, although this > > > would be slightly more difficult since it does not use fixed length > > > records. > > > > Have you thought of running it into a fifo with gzip waiting on the > > other side? I guess that could sort of cause an infinite loop if > > you were recording certain process/vnode interaction unless it was > > batched up somehow. > > Add an ALQ mutex to a vnode, and check for recursion? It's not really recursion, it's the fact that running gzip may cause more information to be written to the pipe that gzip is reading from. I think adding an ALQ _flag_ (you meant flag right?) to the proc struct to prevent ~recursion~ would work. Then again I am wildly speculating about something I should probably UTSL about first. :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message