From owner-freebsd-current@FreeBSD.ORG Fri Sep 23 21:44:08 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 727DC106564A for ; Fri, 23 Sep 2011 21:44:08 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id EFB278FC16 for ; Fri, 23 Sep 2011 21:44:07 +0000 (UTC) Received: by fxg9 with SMTP id 9so5477236fxg.13 for ; Fri, 23 Sep 2011 14:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=XAy/NACuOWiilpdwS7vbrORidPj+Nbfbwb62OiSy8lY=; b=CNCspt6owm+RJ7ZpJIYqoE3snIg0J/QLXgtvfj6yQSkDV+6cGDmUV0muMRe3hvN+V8 6HbhfW6UKTWaTT7/DR8l1U38q8aZ8Ohqic0SuMXscLlQXqqz2tHh8SL4uC1RMl0j3gDi njq3xTOZO9F+ixFLT28tA0Y3nJz39rcFdlpSk= Received: by 10.223.59.137 with SMTP id l9mr5717346fah.15.1316813921468; Fri, 23 Sep 2011 14:38:41 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (advisory-appointer.volia.net. [93.73.242.53]) by mx.google.com with ESMTPS id f10sm12441153fac.14.2011.09.23.14.38.39 (version=SSLv3 cipher=OTHER); Fri, 23 Sep 2011 14:38:40 -0700 (PDT) Sender: Alexander Motin Message-ID: <4E7CFC42.8000409@FreeBSD.org> Date: Sat, 24 Sep 2011 00:38:10 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110910 Thunderbird/6.0.2 MIME-Version: 1.0 To: Adrian Chadd References: In-Reply-To: X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: ath / 802.11n performance issues and timer code 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: Fri, 23 Sep 2011 21:44:08 -0000 On 23.09.2011 18:29, Adrian Chadd wrote: > I've been looking at issues with 802.11n RX performance on these > MIPS24k based MIPS boards. > After doing a bit of digging, I discovered what looked like strange > scheduler issues where the RX and TX completion schedulers weren't > being invoked quickly. > The ath driver schedules these functions using taskqueues. > > Here's the time keeper configuration for my mips24k board: > > # sysctl kern.eventtimer > kern.eventtimer.choice: MIPS32(800) > kern.eventtimer.et.MIPS32.flags: 7 > kern.eventtimer.et.MIPS32.frequency: 360000000 > kern.eventtimer.et.MIPS32.quality: 800 > kern.eventtimer.periodic: 1 > kern.eventtimer.timer: MIPS32 > kern.eventtimer.idletick: 0 > kern.eventtimer.singlemul: 2 > > When I set kern.eventtimer.periodic=1, the 11n TX/RX performance > suddenly jumps to where it should be. > > Would you mind helping me figure out what the problem is? I would be glad to help, but at this moment I am not sure how network traffic related to timer. May be wireless has some specifics, but for wired adapters traffic processing happens on network interrupts. > I didn't think kern.eventtimer.periodic was needed? It should not be needed. Have you tried to set kern.eventtimer.idletick=1 instead? kern.eventtimer.periodic=1 on UP system effectively includes kern.eventtimer.idletick=1. kern.eventtimer.idletick=0 may somewhat increase interrupts overhead due to need to reprogram timer before context switch, but under high interrupt rate (about few KHz) kernel should dynamically switch to "quick" mode skipping it. -- Alexander Motin