Re: poll-related "scheduling while atomic", 2.5.44-mm6

From: Andrew Morton (akpm@digeo.com)
Date: Wed Oct 30 2002 - 01:27:09 EST


Paolo Ciarrocchi wrote:
>
> >> So my guess is somewhere between -mm5 and -mm6 we
> >> screwed up the atomicity count.
> >Mine too. I'll check it out, thanks.
>
> The same here as well
>

This'll fix it up. Whoever invented cut-n-paste has a lot to
answer for.

--- 25/mm/swap.c~preempt-count-fix Tue Oct 29 22:19:54 2002
+++ 25-akpm/mm/swap.c Tue Oct 29 22:20:16 2002
@@ -90,11 +90,12 @@ void lru_cache_add_active(struct page *p
 
 void lru_add_drain(void)
 {
- struct pagevec *pvec = &per_cpu(lru_add_pvecs, get_cpu());
+ int cpu = get_cpu();
+ struct pagevec *pvec = &per_cpu(lru_add_pvecs, cpu);
 
         if (pagevec_count(pvec))
                 __pagevec_lru_add(pvec);
- pvec = &per_cpu(lru_add_active_pvecs, get_cpu());
+ pvec = &per_cpu(lru_add_active_pvecs, cpu);
         if (pagevec_count(pvec))
                 __pagevec_lru_add_active(pvec);
         put_cpu();

.

I had a crash while testing SMP+preempt btw. Nasty one - took a
pagefault from userspace but do_page_fault() decided that the
fault was in-kernel or something. It fell all the way through
to die() and, well, died. I saw the same happen some months ago.
-
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/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:46 EST