From owner-freebsd-net@FreeBSD.ORG Mon Jul 7 22:33:05 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EF74106567F for ; Mon, 7 Jul 2008 22:33:05 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id A94988FC17 for ; Mon, 7 Jul 2008 22:33:04 +0000 (UTC) (envelope-from artemb@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1234370fgb.35 for ; Mon, 07 Jul 2008 15:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=Z+FFaDpSreNnaUoiBpVDDpeQ3+lvtwYBkPFkCaCTpJk=; b=c2XYo5p+nh8TV6ajVA7uV1zIBGdiLdunVnmzq3wZO12qZegQubuz10uOCnybVrzq7A Cb9BjarMatRbLUoZUHjJIGBdfm7nuk2Z1DB9PBqAb7FxF9l8URciXg5b3zbXbm7T0vOK zWc3LYhqVchtqGF/2gFH3P8Y32vcfZQsZLt5w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=F8eqmGIFK9IF9ZNk3I/2kvt6VlE/yO+V1BYjEyJERvn4g89+KAg5wTmIyJqGF4V66j 4kmqBxLDXc0KU5Qm32XbC20dM2gDS7NSZHNTjW0spjLGSQPxL++8sSDo5xRxMK6akJon xevowR0ukKB51fgcgQ5I8JyjM01rebck9fp5A= Received: by 10.86.52.6 with SMTP id z6mr4726861fgz.48.1215469982840; Mon, 07 Jul 2008 15:33:02 -0700 (PDT) Received: by 10.86.83.19 with HTTP; Mon, 7 Jul 2008 15:33:02 -0700 (PDT) Message-ID: Date: Mon, 7 Jul 2008 15:33:02 -0700 From: "Artem Belevich" Sender: artemb@gmail.com To: "Julian Elischer" In-Reply-To: <48727BA9.6020702@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4867420D.7090406@gtcomm.net> <486FFF70.3090402@gtcomm.net> <48701921.7090107@gtcomm.net> <4871E618.1080500@freebsd.org> <20080708002228.G680@besplex.bde.org> <48724238.2020103@freebsd.org> <20080708034304.R21502@delplex.bde.org> <20080708045135.V1022@besplex.bde.org> <48727BA9.6020702@elischer.org> X-Google-Sender-Auth: 45f63404a9c52e94 Cc: FreeBSD Net Subject: Re: Freebsd IP Forwarding performance (question, and some info) [7-stable, current, em, smp] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 22:33:05 -0000 > Prefetching when you are waiting for the data isn't a help. Agreed. Got to start prefetch around ns before you actually need the data and move on doing other things that do not depend on the data you've just started prefetching. > what you need is a speculative prefetch where you an tell teh processor "We > will probably need the following address so start getting it while we go do > other stuff". It does not have to be 'speculative' either. In this particular case we have very good idea that we *will* need some data from ethernet header and, probably, IP and TCP headers as well. We might as well tel the hardware to start pulling data in without stalling the CPU. Intel has instructions specifically for this purpose. I assume AMD has them too. --Artem