Is this a potential deadlock?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kent,
Bcache will put write_dirty_finish into system_wq, and also
journal_write if the journal is full. The write lock of the root node
is hold with journal_write,  and the lock won't be released until
journal_write_done, which means at this moment all work queue kthreads
which run write_dirty_finish will block since they are trying to
require the read lock of root node.

And as we know the max number of active kthreads belong to system_wq
is min(256, 4*num_possible_cpus), so if all kthreads in the poll have
been blocked in write_dirty_finish, the journal_write queued up has no
chance to run, resulting to all the kthreads sleep forever. Is this
ever possible? Have you seen such deadlocks in your systems?

Thanks,
Zhu Yanhai
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux