From owner-freebsd-current@FreeBSD.ORG Wed Mar 22 20:44:22 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 AFC5D16A41F for ; Wed, 22 Mar 2006 20:44:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67DF043D6A for ; Wed, 22 Mar 2006 20:44:16 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k2MKiFPG021470; Wed, 22 Mar 2006 15:44:15 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 22 Mar 2006 15:45:12 -0500 User-Agent: KMail/1.9.1 References: <20060322122906.A41691@xorpc.icir.org> In-Reply-To: <20060322122906.A41691@xorpc.icir.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603221545.13769.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1350/Wed Mar 22 05:12:47 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.7 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Luigi Rizzo Subject: Re: interesting(?) data on network interrupt servicing 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: Wed, 22 Mar 2006 20:44:22 -0000 On Wednesday 22 March 2006 15:29, Luigi Rizzo wrote: > Paolo Pisati (SoC work on in-kernel natd) has done some > work on measuring where time is spent in servicing network > interrupts, and what's the difference between 4.x and 7.x, > and probably has some interesting result. > > He ran the experiments on his laptop (1.6-1.7GHz with APIC > and bfe card), recording timestamps with the TSC in various > places of the code path. > What he saw is that the basic operation of the interruopt > service routine, bfe_intr() is approx the same on 4.x and 7.x, > taking between 7-10k TSC ticks on a lightly loaded system. > On 7.x, however, there is an extra 9-10k TSC ticks (which may > well be hidden in the assembly code on 4.x, but not sure about > that) which apparently are spent half in this line in > sys/i386/i386/intr_machdep.c > > if (thread) > isrc->is_pic->pic_disable_source(isrc, PIC_EOI); This is going out to the I/O APIC and writing a bit to mask the interrupt until the handler has run. Is he using a kernel that has SMP enabled? If so, turning SMP off might make things slightly better. Note that 4.x does do the same writes to the I/O APIC, but in assembly. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org