From owner-svn-src-head@FreeBSD.ORG Fri Apr 9 02:15:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06EB01065674 for ; Fri, 9 Apr 2010 02:15:48 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51803.mail.re2.yahoo.com (web51803.mail.re2.yahoo.com [206.190.38.234]) by mx1.freebsd.org (Postfix) with SMTP id A38B68FC19 for ; Fri, 9 Apr 2010 02:15:47 +0000 (UTC) Received: (qmail 56473 invoked by uid 60001); 9 Apr 2010 02:15:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1270779346; bh=RwqKaNDoEvaAgbhnyVjH4avP69nT7xBGVCrDV3BBZ4I=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=AGiuUOfqAC1HiyQ6UknR9JLRw4Fjdg7UrOcKpE/hLgt8oV9UMQahUlxpU/x95qh/qSshrVLuz+BWyl37zgkMWTk6srWzDg/qhx0WuAcA7ifx5SB/ggvVmK08NEvRHbYbqCkafz1CNMVcV1fxuHcluR4fL8mF8Ecgff4QrxD0i+o= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=aIRVyraygwGMnWAWkbXKCSLtH4Y00fMpRQZ1RiTbkYuv18yRyaAvTyEFhWKHJWes5u0Th6XBrJ5HDTAYzzA0X6PiB/J1YqUDMsBCU6Fa8EpxNQirOQZEo2ZpOkPeTlC/tU4H563x3pN8RbcSe9dId/eBlkbFALheugKZ31iIsBE=; Message-ID: <488108.55494.qm@web51803.mail.re2.yahoo.com> X-YMail-OSG: eyiRXL8VM1nW1onI1bGt2fx71BEk4GRfbYp3qvaD_apjMWkZJT5xf4hSixcD6TJVy25JqbVHy9_BVKo5w7dPbpI975q1ILuVVhLjwvMrczd0bPW5DY.sjRaSNd05UQqoRG0aXoNKV1oFyPJ9y7udX5m.Gr2Dz.sQeNa3H0KoCfAxdgJJjA16bY8vlKRQihJxOLDQfw.D7tyZ2hVe9hZatWd0gLboj3BbJwJoSAGawLSAbdQYK1KL9CRbQI1MdfwNjy2roGnVbAY3T1O0pqawGIn89_hmrPS9e9IfrK7VIdmz2yzHoSiLIQTG6GWl7HGp4z0VYp.JUWTdWQzJkYaNoHke92LvslIQY.KK7ePl6F81 Received: from [173.183.132.20] by web51803.mail.re2.yahoo.com via HTTP; Thu, 08 Apr 2010 19:15:46 PDT X-Mailer: YahooMailRC/324.3 YahooMailWebService/0.8.100.260964 References: <20100407165048.8CF9E106566B@hub.freebsd.org> Date: Thu, 8 Apr 2010 19:15:46 -0700 (PDT) From: PseudoCylon To: Rui Paulo , svn-src-head@freebsd.org In-Reply-To: <20100407165048.8CF9E106566B@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206358 (patch for if_run) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 02:15:48 -0000 >>Author: rpaulo >>Date: Wed Apr 7 15:29:13 2010 >>New Revision: 206358 >>URL: http://svn.freebsd.org/changeset/base/206358 >> >>Log: >> net80211 rate control framework (net80211 ratectl). >> >> This framework allows drivers to abstract the rate control algorithm and >> just feed the framework with the usable parameters. The rate control >> framework will now deal with passing the parameters to the selected >> algorithm. Right now we have AMRR (the default) and RSSADAPT but there's >> no way to select one with ifconfig, yet. >> The objective is to have more rate control algorithms in the net80211 >> stack so all drivers[0] can use it. Ideally, we'll have the well-known >> sample rate control algorithm in the net80211 at some point so all >> drivers can use it (not just ath). >> > >Hello, > >I've just tried the commit and run(4) works fine out of the box. It properly updates the rate. > >Thank you for updating the driver. > >AK > Sorry, correction. I've got complain from witness uma_zalloc_arg: zone "64" with the following non-sleepable locks held: exclusive sleep mutex run0 (network driver) r = 0 (0xffffff80008de128) locked @ /usr/src/sys/dev/usb/usb_request.c:540 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a _witness_debugger() at _witness_debugger+0x2e witness_warn() at witness_warn+0x2c2 uma_zalloc_arg() at uma_zalloc_arg+0x335 malloc() at malloc+0x9a amrr_node_init() at amrr_node_init+0x38 run_newstate() at run_newstate+0x363 ieee80211_newstate_cb() at ieee80211_newstate_cb+0xac taskqueue_run() at taskqueue_run+0x91 taskqueue_thread_loop() at taskqueue_thread_loop+0x3f fork_exit() at fork_exit+0x12a fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff803e5d0d30, rbp = 0 --- Just unlocking the mutex before calling ieee80211_ratectl_node_init() fix this. As long as ieee80211_ratectl_node_init() won't be called with the same ni at the same time, unlocking should be safe. Here is patch *** orig_if_run.c 2010-04-08 03:29:31.000000000 -0600 --- fix_if_run.c 2010-04-08 19:52:45.000000000 -0600 *************** *** 1965,1969 **** uint32_t sta[3]; - #if 0 - uint8_t wcid; - #endif --- 1965,1966 ---- *************** *** 1975,1981 **** ! #if 0 ! wcid = RUN_AID2WCID(ni == NULL ? 0 : ni->ni_associd); ! ieee80211_amrr_node_init(&rvp->amrr, &rvp->amn[wcid], ni); ! #endif ieee80211_ratectl_node_init(ni); --- 1972,1976 ---- ! RUN_UNLOCK(sc); ieee80211_ratectl_node_init(ni); + RUN_LOCK(sc); *************** *** 2096,2102 **** - #if 0 - wcid = RUN_AID2WCID(ni == NULL ? 0 : ni->ni_associd); - amn = &rvp->amn[wcid]; - #endif - /* count failed TX as errors */ --- 2091,2092 ---- P.S. #if 0s (amn[]) are no longer needed because now each amrr node is attached to individual ieee80211_node. AK __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com.