Date: Tue, 27 Sep 2011 11:18:45 +0800 From: Adrian Chadd <adrian@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: Alexander Motin <mav@freebsd.org>, freebsd-current@freebsd.org Subject: Re: ath / 802.11n performance issues and timer code Message-ID: <CAJ-Vmong0dJN=t=Qq4%2BaLyBGxEKAKBd8oX4y9P0goux%2BZAc3yA@mail.gmail.com> In-Reply-To: <CAJ-Vmo=ZBwBu6Mk=XdY1p18s5=kQvmC3qZc1JzPtpppGBs4Z=Q@mail.gmail.com> References: <CAJ-VmomZyDJV62yCQOvG=UB6H4wfz9=3_cWzEL7vWAA14TCyYA@mail.gmail.com> <201109261053.30410.jhb@freebsd.org> <CAJ-VmomyMQpcpHo4ve-_O67_8VVJW-YRqWeb-7exSxzV5rz_pA@mail.gmail.com> <201109261305.57602.jhb@freebsd.org> <CAJ-Vmo=ZBwBu6Mk=XdY1p18s5=kQvmC3qZc1JzPtpppGBs4Z=Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi John/Alex. The AR71xx MIPS kernels didn't include PREEMPTION. This seems a bit silly, as it's needed by sched_4bsd to actually compile in the code in maybe_preempt(). So I added it, and it simply increased CPU use without fixing the issue. But yes, maybe_preempt() is now setting td_owepreempt. This however doesn't fix it. I have a gem of a trace here: http://people.freebsd.org/~adrian/ath/ktr.7.sorted.txt . I've added some ath interrupt and RX tasklet trace points. Look for RXEOL and work your way backwards. The course of events: * 2128: switch to idle * 2130: ath0 intr comes in * 2132/2133: put on runq, wakeup ath0 netisr * 2134: maybe_preempt gets called, so hopefully td_owepreempt is going on * 2136: "skip" in kern_clocksource.c * 2139: the clock0 interrupt comes in - the latency between 2138 and 2139 is huge (70ms?) At this point it schedules clock0 swi, where 11 statclock entries get recorded. Then it calls my ath netisr routine, but by this point RXEOL (end of RX descriptor list) has occured. Now, there was an ath0 interrupt just before this. Is it possible that two quick successive ath0 interrupts are triggering some strange behaviour? Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmong0dJN=t=Qq4%2BaLyBGxEKAKBd8oX4y9P0goux%2BZAc3yA>