Andrew Morton wrote: > This can run under one of two depths of lock_kernel. filemap_fdatawrite() > and filemap_fdatawait() both do cond_resched(), so this is odd. > > Try this: > > --- 25/mm/truncate.c~truncate_inode_pages-latency-fix 2004-07-12 23:12:53.871816320 -0700 > +++ 25-akpm/mm/truncate.c 2004-07-12 23:13:00.993733624 -0700 > @@ -155,6 +155,7 @@ void truncate_inode_pages(struct address > > next = start; > for ( ; ; ) { > + cond_resched(); > if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { > if (next == start) > break; > _ I had a few of these with this patch. Is it cond_resched'ing twice? Con 2ms non-preemptible critical section violated 1 ms preempt threshold starting at flush_commit_list+0x11d/0x3ee and ending at schedule+0x216/0x841 [] dec_preempt_count+0x14f/0x151 [] schedule+0x216/0x841 [] schedule+0x216/0x841 [] do_IRQ+0x176/0x1eb [] cpu_idle+0x3a/0x3c [] start_kernel+0x19c/0x1e8 [] unknown_bootoption+0x0/0x15e 2ms non-preemptible critical section violated 1 ms preempt threshold starting at do_journal_end+0x539/0xae8 and ending at schedule+0x216/0x841 [] dec_preempt_count+0x14f/0x151 [] schedule+0x216/0x841 [] schedule+0x216/0x841 [] smp_apic_timer_interrupt+0x97/0x166 [] cpu_idle+0x3a/0x3c [] call_console_drivers+0xcd/0xea [] release_console_sem+0xa3/0x101 [] printk+0x13d/0x19c 2ms non-preemptible critical section violated 1 ms preempt threshold starting at flush_async_commits+0x1b/0xf7 and ending at schedule+0x216/0x841 [] dec_preempt_count+0x14f/0x151 [] schedule+0x216/0x841 [] schedule+0x216/0x841 [] load_balance+0x147/0x1ff [] smp_apic_timer_interrupt+0x97/0x166 [] work_resched+0x5/0x16