Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2011 11:36:26 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>, attilio@freebsd.org
Cc:        freebsd-current@freebsd.org, freebsd-mips@freebsd.org
Subject:   Re: ath / 802.11n performance issues and timer code
Message-ID:  <CAJ-VmonJRLQFanKx2VJoigm=SUmMBuYPJT%2BxfAisO9q%2B=qTShw@mail.gmail.com>
In-Reply-To: <CAJ-VmonbAgsNjdCstd_Ap6JBqowD1NX0J5rQ=t9ideaiXTXd%2BA@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> <CAJ-Vmong0dJN=t=Qq4%2BaLyBGxEKAKBd8oX4y9P0goux%2BZAc3yA@mail.gmail.com> <CAJ-VmonbAgsNjdCstd_Ap6JBqowD1NX0J5rQ=t9ideaiXTXd%2BA@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

.. and as a follow up (and cc'ing attillo and freebsd-mips, in case
it's relevant to other platforms and there's a MIPS specific thing to
fix):

* 2128: mi_switch to idle
* 2129: kern_clocksource.c:762 - ie, cpu_idleclock() has been called
* 2130: the ath interrupt comes in
* 2134: it's skipped for now as the idle thread is in a critical section
* 2136: kern_clocksource.c:266 - ie, getnextcpuevent(), inside cpu_idleclock().

What I bet is happening is this race between the critical section +
cpu_idleclock() and the ath0 interrupt:

* idle gets scheduled
* critical_enter() is called in the mips cpu_idle() routine
* the ath interrupt comes in here and gets handled, but since we're in
a critical section, it won't preempt things
* the cpu_idleclock() code completes without releasing the preemption,
and the only thing that wakes up from that wait is the next interrupt
(clock, arge0, etc.)




Adrian


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonJRLQFanKx2VJoigm=SUmMBuYPJT%2BxfAisO9q%2B=qTShw>