Return-path: Received: from mail-wg0-f42.google.com ([74.125.82.42]:55331 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752593Ab3ABUNG (ORCPT ); Wed, 2 Jan 2013 15:13:06 -0500 Received: by mail-wg0-f42.google.com with SMTP id dr1so6132699wgb.3 for ; Wed, 02 Jan 2013 12:13:05 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <018d01cde90c$c7145410$553cfc30$@acksys.fr> References: <773DB8A82AB6A046AE0195C68612A31901412125@sbs2003.acksys.local> <50E2FE5E.6040300@openwrt.org> <016301cde8eb$8b92ba60$a2b82f20$@acksys.fr> <018d01cde90c$c7145410$553cfc30$@acksys.fr> Date: Wed, 2 Jan 2013 12:13:05 -0800 Message-ID: (sfid-20130102_211311_413909_64D6B932) Subject: Re: [RFC] ATH9K: infinite loop in Tasklet From: Adrian Chadd To: voncken Cc: Felix Fietkau , Mohammed Shafi , linux-wireless@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 2 January 2013 09:15, voncken wrote: > Yes, > > I used an mpc8314 at 400Mhz, with 128 Mbit of RAM for my test. Ah! > To find it, I measured the time elapsing in ath_rxbuf_alloc(..) with > the kernel function local_clock(). > > With SLOB I found around 123 us (and I have an infinite loop in > ath9k tasklet, because when I have consumed one packet the next packet is > ready to rx process) > With SLAB I found around 22 us > With SLUB I found around 10 us Cool. That's significantly more CPU.. :-) So yes, the right thing to do here is to break out after a limit is reached, and if we hit that limit, re-schedule that tasklet to run. Adrian