From owner-freebsd-arch@FreeBSD.ORG Fri Jan 4 10:40:46 2008 Return-Path: <owner-freebsd-arch@FreeBSD.ORG> Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77AAE16A421; Fri, 4 Jan 2008 10:40:46 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 2BFA913C469; Fri, 4 Jan 2008 10:40:46 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 2141D17105; Fri, 4 Jan 2008 10:40:45 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m04Aeil4005078; Fri, 4 Jan 2008 10:40:44 GMT (envelope-from phk@critter.freebsd.dk) To: "Attilio Rao" <attilio@freebsd.org> From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> In-Reply-To: Your message of "Thu, 03 Jan 2008 16:48:37 +0100." <3bbf2fe10801030748u28fe346byd051cecfa55cf636@mail.gmail.com> Date: Fri, 04 Jan 2008 10:40:44 +0000 Message-ID: <5077.1199443244@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org, Robert Watson <rwatson@freebsd.org>, Andre Oppermann <andre@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: New "timeout" api, to replace callout X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture <freebsd-arch.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>, <mailto:freebsd-arch-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arch> List-Post: <mailto:freebsd-arch@freebsd.org> List-Help: <mailto:freebsd-arch-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>, <mailto:freebsd-arch-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 04 Jan 2008 10:40:46 -0000 In message <3bbf2fe10801030748u28fe346byd051cecfa55cf636@mail.gmail.com>, "Atti lio Rao" writes: >2008/1/3, Poul-Henning Kamp <phk@phk.freebsd.dk>: >> What I'm proposing is that your thread will sleep on a plain, but >> unrelated mutex (internal to the timeout code) until the function >> comes back. >> >> Based on your description above, you won't be able to tell the >> any difference between this and what you wish for. > >This will be hardly feasible. >Internal callout subsystem locks probabilly need to be spinlocks in >order to avoid lock mismatches against sleepable locks. callouts will not be allowed to sleep, they never should have been able to. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.