From owner-freebsd-current@FreeBSD.ORG Thu Apr 6 19:10:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 680AD16A7B6; Thu, 6 Apr 2006 19:10:55 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outbound7.internet-mail-service.net (outbound7.internet-mail-service.net [216.240.47.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7964F45BF2; Thu, 6 Apr 2006 18:18:48 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by outbound.internet-mail-service.net (Postfix) with ESMTP id 964012453D9; Thu, 6 Apr 2006 11:18:47 -0700 (PDT) Received: from [192.168.2.5] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id k36IIjHj005840; Thu, 6 Apr 2006 11:18:46 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <44355B85.9060709@elischer.org> Date: Thu, 06 Apr 2006 11:18:45 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <20060405003358.GA83600@tin.it> <200604051638.59800.jhb@freebsd.org> <4434394F.8020105@elischer.org> <200604061311.31632.jhb@freebsd.org> In-Reply-To: <200604061311.31632.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Luigi Rizzo , freebsd-current@freebsd.org Subject: Re: Interesting data on network interrupt - part II X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2006 19:10:55 -0000 John Baldwin wrote: >On Wednesday 05 April 2006 17:40, Julian Elischer wrote: > > >>John Baldwin wrote: >> >> >> >>>On Tuesday 04 April 2006 20:33, Paolo Pisati wrote: >>> >>> >>> >>> >>>>Hi, >>>> >>>>i updated my work on interrupt profiling with sone new >>>>experiments. >>>> >>>>In total we have now: >>>> >>>>-FreeBSD 4 PIC (no asm part) >>>>-FreeBSD 7 APIC >>>>-FreeBSD 7 PIC >>>>-FreeBSD 7 PREE APIC >>>>-FreeBSD 7 APIC JHB >>>> >>>>Some quick comments: >>>> >>>>-PIC is much slower in masking interrupt (7k in PIC vs 3k in APIC) >>>>-PREE let new thread save less than 500 ticks of 'queue' while >>>>preempted threads are often resumed after a lot >>>>-JHB patch shaved 2.5k ticks in interrupt masking op >>>> >>>>For graphs, data and more comments: >>>> >>>>http://mercurio.sm.dsi.unimi.it/~pisati/interrupt/ >>>> >>>> >>>> >>>> >>>I'll commit the patch then. :) One thing you might try to do to better >>>measure the effects of preemption is to generate kernel work so that >>>the bge interrupts occur while the current thread is in the kernel >>>rather than in userland. In that case preemption should provide much >>>lower latency for interrupt handlers, as w/o preemption, an interrupt >>>in kernel mode won't run the ithread until either curthread blocks or >>>returns to userland. >>> >>> >>> >>> >>it looks a bit like the preempted threads shuld be put onto a stack of >>threads to resume >>so that when the pre-empter finishes, teh previosly active thread is >>resumed. >>Basically, a preempted thread should be put at the HEAD of it's run >>queue, and not the tail.. >> >> > >You changed the scheduler to already do that. > > oh, yeah,..... at least I'm consistent..