From owner-freebsd-mips@FreeBSD.ORG Thu May 29 03:03:59 2014 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0AA26D3 for ; Thu, 29 May 2014 03:03:58 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 715D821B3 for ; Thu, 29 May 2014 03:03:57 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id l4so6326350lbv.20 for ; Wed, 28 May 2014 20:03:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=3RkECEZGVrD72fZi98FpsQlOls0n4582Yy3FedrJFw0=; b=j3LAeqLUtg5h8dhFW3Qm74uBjdiseDbrjA2P3qMVOXIEk9Fqmqmq1A8vJdYKSCnBy+ wrA8T4+cZBBkGrimskt2n6gLCnUHoUeoRzHcB4HWBeT9Vb+y5JNF3SnQm3Dqg4RDmIuZ A0OtZIVZgAfZZ/mG5WeZR3iYfrKF/r5Md/xVDu/eSzvpVcLq5WTSWivtAAi6BUPks9/G k83o4E67plbU0diOW8/QVPdUZmQNW/zq2ZfQMkZab7lHy2a4xRwl3ZmkX1zpwQCXdNxo kLfnWpKBGivwNH97s2Ndd+QL84bxM8az9/PEjwLH8MWHf59e/0bNBpmq7m1Ir86uoSAP YA5w== X-Gm-Message-State: ALoCoQnSRfxPtnjeghGVOYbEbDpYCq5AWF32eOSgFXDxt5QooXFiIsAqRN5RbkaEs49SjkYBseUQ X-Received: by 10.112.6.103 with SMTP id z7mr3290294lbz.58.1401332228607; Wed, 28 May 2014 19:57:08 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.124.8 with HTTP; Wed, 28 May 2014 19:56:48 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Wed, 28 May 2014 19:56:48 -0700 X-Google-Sender-Auth: f9xkd_dB0aszQKMKFgTdHC7ttMY Message-ID: Subject: Re: Are there any hardcoded limits on octeon ethernet module? To: Cesar Fazan Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-mips@FreeBSD.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 03:03:59 -0000 Cesar, On Wed, May 28, 2014 at 7:47 PM, Cesar Fazan wrote: > Hi, > > While testing the network performance of FreeBSD 10 running on EdgeRouter > Lite I noticed that kernel{octe taskq_0/1} can't use more than 50% of the > cpu. > > Are there any hardcoded limiting this? > There's no hard-coded limits, but there are some deficiencies in the current driver, particularly with regard to its ability to moderate interrupts and process packets in batches. Linux performs better because of NAPI, which is more suited to the kind of batch processing that Octeon wants. FreeBSD's DEVICE_POLLING would be better, but the committed driver lacks support for it, though I can probably dig up some old patches I did as a proof-of-concept for it. The right fix is for someone with a lot of patience to get interrupt moderation working, and then to handle batch processing correctly. There's no tunables or anything you should work with here, it's a matter of needed changes to the kernel driver. Thanks, Juli.