All of lore.kernel.org
 help / color / mirror / Atom feed
* Multi-partition block layer behaviour
@ 2011-10-26  5:12 Tiju Jacob
  2011-10-26  5:42 ` Shaohua Li
  0 siblings, 1 reply; 10+ messages in thread
From: Tiju Jacob @ 2011-10-26  5:12 UTC (permalink / raw)
  To: linux-kernel

Hi All,

We are trying to run fsstress tests on ext4 filesystem with
linux-3.0.4 on nand flash with our proprietary driver. The test runs
successfully when run on single partition but fails when run on
multiple partitions with the bug "BUG: scheduling while atomic:
fsstress.fork_n/498/0x00000002".

Analysis:

1. When an I/O request is made to the filesystem, process 'A' acquires
a mutex FS lock and a mutex block driver lock.

2. Process 'B' tries to acquire the mutex FS lock, which is not
available. Hence, it goes to sleep. Due to the new plugging mechanism,
before going to sleep, shcedule() is invoked which disables preemption
and the context becomes atomic. In schedule(), the newly added
blk_flush_plug_list() is invoked which unplugs the block driver.

3) During unplug operation the block driver tries to acquire the mutex
lock which fails, because the lock was held by process 'A'. Previous
invocation of scheudle() in step 2 has already made the context as
atomic, hence the error "Schedule while atomic" occured.


Please recommend us on how to handle this situation.


Thanks in advance.
--TJ

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-11-03 11:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26  5:12 Multi-partition block layer behaviour Tiju Jacob
2011-10-26  5:42 ` Shaohua Li
2011-10-26 10:10   ` Tiju Jacob
2011-10-27  0:42     ` Shaohua Li
2011-10-31  4:35       ` Tiju Jacob
2011-10-31  5:39         ` Shaohua Li
2011-10-31  6:14           ` Shaohua Li
2011-10-31 10:21             ` Tiju Jacob
2011-11-01  0:29               ` Shaohua Li
2011-11-03 11:18                 ` Tiju Jacob

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.