From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 1 09:38:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C989C106566C; Sat, 1 Oct 2011 09:38:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 78DD28FC0C; Sat, 1 Oct 2011 09:38:20 +0000 (UTC) Received: by vws11 with SMTP id 11so2655503vws.13 for ; Sat, 01 Oct 2011 02:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=B3FuaIbNyfrKUCwOO7W+zRt3O2U+0yj0uFCKhIJ3AkQ=; b=mSq9Ub73lrGJMwyDjmDf2nIg66E9iZPJIRFOQvVrZ6Lof7K84+AjOH1X3AB60l7D0b UFrrQDLE8w1HKmvlLHRWTVFOPaX1yObsinun5+xdyzzyCSq0Y3Ag9AC7MPxj+ZExw9+a qZM5QNHcI9LdqMQO1JgrY43Jv+z7X6CCjk9Z8= MIME-Version: 1.0 Received: by 10.52.72.16 with SMTP id z16mr12123623vdu.395.1317461899780; Sat, 01 Oct 2011 02:38:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.161.138 with HTTP; Sat, 1 Oct 2011 02:38:19 -0700 (PDT) In-Reply-To: <4E86DC86.3040204@FreeBSD.org> References: <4E86DC86.3040204@FreeBSD.org> Date: Sat, 1 Oct 2011 17:38:19 +0800 X-Google-Sender-Auth: ZAXmR4USGW_-e4tZ9IT33wGirJk Message-ID: From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: how are callouts handled in cpu_idle() ? 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: Sat, 01 Oct 2011 09:38:20 -0000 On 1 October 2011 17:25, Alexander Motin wrote: > Use of critical section in cpu_idle() from the beginning was based on > number of assumptions about filter interrupt handler's limitations. [snip] > So, if you really need to use callout() in interrupt filter, we could > disable interrupts before calling cpu_idleclock(), as you have told. But > that is only a partial solution and you should be ready for the second > half of the problems. Depending on your needs I am not sure it will > satisfy you. I'm not using callouts from a swi in ath(4), at least not yet. I haven't yet gone over all the drivers in sys/dev/ to see if any of them are actually doing this. I was just making an observation. I may have to go digging into how Linux manages to do this without having the occasional interrupt latency issue that FreeBSD/MIPS is. For all I know, Linux has the same issue on the mips32 platforms that I'm currently testing on. Adrian