From owner-freebsd-wireless@FreeBSD.ORG Thu Jul 18 17:19:57 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EF68998 for ; Thu, 18 Jul 2013 17:19:57 +0000 (UTC) (envelope-from petar@smokva.net) Received: from crane.smokva.net (crane.smokva.net [88.198.45.5]) by mx1.freebsd.org (Postfix) with ESMTP id 6ED59C38 for ; Thu, 18 Jul 2013 17:19:56 +0000 (UTC) Received: from pintail.NGC004 (78-1-125-145.adsl.net.t-com.hr [78.1.125.145]) by crane.smokva.net (Postfix) with ESMTPSA id 0EEC9106970F for ; Thu, 18 Jul 2013 19:19:51 +0200 (CEST) Date: Thu, 18 Jul 2013 19:19:45 +0200 From: Petar Bogdanovic To: freebsd-wireless@freebsd.org Subject: Re: high latency due to distant clients Message-ID: <20130718171945.GA6817@pintail.NGC004> Mail-Followup-To: freebsd-wireless@freebsd.org References: <20130718155200.GA381@pintail.NGC004> <20130718160436.GB381@pintail.NGC004> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21+67 (d414971f0c48) (2011-07-01) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2013 17:19:58 -0000 On Thu, Jul 18, 2013 at 09:25:19AM -0700, Adrian Chadd wrote: > On 18 July 2013 09:04, Petar Bogdanovic wrote: > > On Thu, Jul 18, 2013 at 08:59:29AM -0700, Adrian Chadd wrote: > >> > >> I think I fixed this in -HEAD. > > > > Uh-oh, great! Will that change reach a stable release anytime soon? > > When 10.0 is stable, yup. :) > > > And--out of naive curiosity--what was the problem? > > The ath driver before 11n support went in would just fill the hardware > TX queue with frames. There's no per-station queue or any kind of fair > queuing. So if you fill the TX queue in the driver with frames to a > far away station, it'll block all frames to other stations whilst > they're transmitted and retransmitted. > > When I introduced 11n support, I added per-station and > per-traffic-class queues in the driver as part of A-MPDU support. I > software queue almost everything first and then schedule frames to the > hardware from these software queued frames. This has the side effect > of making it fairer between multiple stations, especially if one of > them is far away. It will only schedule a small number of frames to > each station before going to another station, rather than possibly > being backed up with 128 frames just to a single destination. > > Now, it's likely there's more work that can be done to improve that > behaviour with slow, far away clients. The framework is there in > -HEAD. I've just not sat down and made it work. So if you update to > -HEAD and you still have problems, we can tweak things and experiment. Thanks for the nice and comprehensive explanation! I'll prepare the upgrade during the next couple of weeks and report back. It will probably be 9.1 userland and HEAD kernel (that approach worked well in the past). Petar Bogdanovic