Andrew Morton wrote: > Con Kolivas wrote: > >>4ms at blkdev_put+0x48 > > > 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: > Thanks! I'll certainly give that a shot. > Need to see the whole trace. Do you mean the traces from your patch or the ones that come from this preempt test like this? Jul 13 07:22:18 pc kernel: 4ms non-preemptible critical section violated 1 ms preempt threshold starting at exit_mmap+0x1c/0x188 and ending at exit_mmap+0x 118/0x188 Jul 13 07:22:18 pc kernel: [] dec_preempt_count+0x14f/0x151 Jul 13 07:22:18 pc kernel: [] exit_mmap+0x118/0x188 Jul 13 07:22:18 pc kernel: [] exit_mmap+0x118/0x188 Jul 13 07:22:18 pc kernel: [] mmput+0x61/0x7b Jul 13 07:22:18 pc kernel: [] exec_mmap+0x11d/0x248 Jul 13 07:22:18 pc kernel: [] flush_old_exec+0x45/0x284 Jul 13 07:22:18 pc kernel: [] load_elf_binary+0x3e8/0xd00 Jul 13 07:22:18 pc kernel: [] do_generic_mapping_read+0x295/0x4f2 Jul 13 07:22:18 pc kernel: [] search_binary_handler+0xd0/0x34c Jul 13 07:22:18 pc kernel: [] load_elf_binary+0x0/0xd00 Jul 13 07:22:18 pc kernel: [] search_binary_handler+0xe7/0x34c Jul 13 07:22:18 pc kernel: [] do_execve+0x1cb/0x23c Jul 13 07:22:18 pc kernel: [] getname+0x55/0xb8 Jul 13 07:22:18 pc kernel: [] sys_execve+0x35/0x68 Jul 13 07:22:18 pc kernel: [] sysenter_past_esp+0x52/0x71 I can try and extract the exact points from the disassembly after some guidance I've received (most of them seem to be buried deep in inlined functions.) The exit_mmap one seemed to work out (as you probably saw in my previous email) to be set off here: profile_exit_mmap(mm); lru_add_drain(); c014cfce: e8 18 72 ff ff call c01441eb spin_lock(&mm->page_table_lock); c014cfd3: e8 16 06 fd ff call c011d5ee Cheers, Con