Re: Preempt Threshold Measurements

From: Con Kolivas
Date: Tue Jul 13 2004 - 16:57:52 EST


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
[<c011d769>] dec_preempt_count+0x14f/0x151
[<c031d716>] schedule+0x216/0x841
[<c031d716>] schedule+0x216/0x841
[<c01085c7>] do_IRQ+0x176/0x1eb
[<c01040b3>] cpu_idle+0x3a/0x3c
[<c040094c>] start_kernel+0x19c/0x1e8
[<c0400402>] 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
[<c011d769>] dec_preempt_count+0x14f/0x151
[<c031d716>] schedule+0x216/0x841
[<c031d716>] schedule+0x216/0x841
[<c0116284>] smp_apic_timer_interrupt+0x97/0x166
[<c01040b3>] cpu_idle+0x3a/0x3c
[<c0120659>] call_console_drivers+0xcd/0xea
[<c01209da>] release_console_sem+0xa3/0x101
[<c012088a>] 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
[<c011d769>] dec_preempt_count+0x14f/0x151
[<c031d716>] schedule+0x216/0x841
[<c031d716>] schedule+0x216/0x841
[<c011b88c>] load_balance+0x147/0x1ff
[<c0116284>] smp_apic_timer_interrupt+0x97/0x166
[<c010604e>] work_resched+0x5/0x16

Attachment: signature.asc
Description: OpenPGP digital signature