From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 2 03:04:05 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 B833616A400 for ; Sun, 2 Apr 2006 03:04:05 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06E8043D48 for ; Sun, 2 Apr 2006 03:04:04 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k32344CO030980; Sat, 1 Apr 2006 21:04:04 -0600 (CST) (envelope-from dan) Date: Sat, 1 Apr 2006 21:04:04 -0600 From: Dan Nelson To: =?utf-8?Q?V=C3=A1clav?= Haisman Message-ID: <20060402030404.GB83967@dan.emsphone.com> References: <442E9354.5010700@sh.cvut.cz> <20060401180311.GA83967@dan.emsphone.com> <442EC7F7.3000608@sh.cvut.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <442EC7F7.3000608@sh.cvut.cz> X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: hackers@freebsd.org Subject: Re: kqueue oddity X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Apr 2006 03:04:05 -0000 In the last episode (Apr 01), Vclav Haisman said: > Dan Nelson wrote: > > It's a kqueue bug, but a minor one. The problem is that the same > > "flags" field is used to pass "actions" from the client, and return > > status from the kernel. When you call kqueue with EV_ADD, the > > kernel never clears the flags when creating the internal object, so > > it's always visible when events fire. This can get annoying when > > trussing kqueue-using programs because very single event has the > > EV_ADD flag :) Apply the following diff to have the kernel strip > > EV_ADD: > > Thanks. Why isn't this fix applied? From the patch's time stamp it > seems like it is known for quite some time now. Mainly because it's a cosmetic thing; most of the time you're not printing the raw kevent values. I never submitted a PR because it only gets annoying if my truss PR ( http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/52190 ) is committed, so it's waiting for that. EV_DISABLE needs the same treatment; my full kevent debugging patch is at http://www.allantgroup.com/FreeBSD/kevent.diff . -- Dan Nelson dnelson@allantgroup.com