From owner-cvs-src@FreeBSD.ORG Thu Jul 15 05:50:41 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9483C16A4CE; Thu, 15 Jul 2004 05:50:41 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D05743D41; Thu, 15 Jul 2004 05:50:41 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.11/8.12.11) with ESMTP id i6F5oTFx026920; Wed, 14 Jul 2004 22:50:33 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200407150550.i6F5oTFx026920@gw.catspoiler.org> Date: Wed, 14 Jul 2004 22:50:29 -0700 (PDT) From: Don Lewis To: alfred@FreeBSD.org In-Reply-To: <20040714210132.GI95729@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: rwatson@FreeBSD.org cc: src-committers@FreeBSD.org cc: dfr@nlsystems.com cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_event.c src/sys/sys eventvar.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2004 05:50:41 -0000 On 14 Jul, Alfred Perlstein wrote: > * Don Lewis [040714 13:38] wrote: >> On 14 Jul, Alfred Perlstein wrote: >> > * Doug Rabson [040714 12:01] wrote: >> >> >> Seems to me that the best thing to do is to defer the psigio() to a >> >> taskqueue that will run in a simpler locking environment. >> > >> > I was thinking that, but I'm worried about "stale delivery", >> > perhaps we need to record the generation count (process start time) >> > in the sigio as well as the request sent, so that we don't send >> > a signal to the wrong process. >> >> This is already handled in the sigio infrastructure. Both struct proc >> and struct pgrp have a list of their potential sigio sources. When the >> process or process group goes away, the exit code disables sigio >> delivery. > > Yes, but if the delivery of the signal becomes async, then we lose > this. Push a reference to the struct sigio onto the taskqueue would be a quick and dirty way of dealing with this. The ugly part is that it would mean adding a reference count and a valid flag to the struct sigio.