lkml.org 
[lkml]   [2005]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PPC RT Patch..
Frank Rowand wrote:
> john cooper wrote:
>> ... There is also a bug fix
>> contained for tlb_gather_mmu() which was causing debug
>> assertions to be generated in a path which attempted to
>> sleep with a non-zero preempt count.
>
>
> Manish Lachwani mentioned to me that he faced the same issue
> with the MIPS RT support and that when he discussed
> it with Ingo that the solution was for include/asm-ppc/tlb.h
> to include/asm-generic/tlb-simple.h when PREEMPT_RT is turned on.
> The patch does this for the #ifdef CONFIG_PPC_STD_MMU case,
> but not for the #else case. I don't know which case is used
> for the Ampro board.

It appeared to me a generic issue though I believe a number
of solutions are possible. asm-generic/tlb.h:tlb_gather_mmu()
expands to linux/percpu.h:get_cpu_var() which does a
preempt_disable() and __get_cpu_var(). This caused the debug
assertion to kick when __page_cache_release() and to a lesser
extent activate_page() attempted to block on a mutex (though
other paths may well exist). My approach was to replace the
outer layer preempt_disable/enable calls with a mutex-spinlock.

The fix was fairly easy once it was known from where the
gratuitous call to preempt_disable() existed. I cobbled
together a logging mechanism which detected the problem. As it
wasn't very general I removed it from the patch. I didn't see
an alternate means of diagnosing such a scenario so I'll likely
address generalizing the code.

-john


--
john.cooper@timesys.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.062 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site