From owner-svn-src-all@FreeBSD.ORG Thu Apr 22 20:25:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1844106564A; Thu, 22 Apr 2010 20:25:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFC148FC0A; Thu, 22 Apr 2010 20:25:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3MKP74r082408; Thu, 22 Apr 2010 20:25:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3MKP7im082406; Thu, 22 Apr 2010 20:25:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004222025.o3MKP7im082406@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 22 Apr 2010 20:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207071 - head/sys/dev/sge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2010 20:25:07 -0000 Author: yongari Date: Thu Apr 22 20:25:07 2010 New Revision: 207071 URL: http://svn.freebsd.org/changeset/base/207071 Log: Intialize interrupt moderation control register. The magic value was chosen by lots of trial and errors. The chosen value shows good interrupt moderation without additional latency. Without this change, controller can generate more than 140k interrupts per second under high network load. Submitted by: xclin cs dot nctu dot edu dot tw > Modified: head/sys/dev/sge/if_sge.c Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Thu Apr 22 19:18:10 2010 (r207070) +++ head/sys/dev/sge/if_sge.c Thu Apr 22 20:25:07 2010 (r207071) @@ -1551,10 +1551,13 @@ sge_init_locked(struct sge_softc *sc) /* * XXX Try to mitigate interrupts. */ + CSR_WRITE_4(sc, IntrControl, 0x08880000); +#ifdef notyet if (sc->sge_intrcontrol != 0) CSR_WRITE_4(sc, IntrControl, sc->sge_intrcontrol); if (sc->sge_intrtimer != 0) CSR_WRITE_4(sc, IntrTimer, sc->sge_intrtimer); +#endif /* * Clear and enable interrupts.