Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-10-15 Thread Coly Li
On 2018/10/4 下午10:07, Eddie Chapman wrote: > On 28/09/18 03:32, Coly Li wrote: >> >> On 9/27/18 11:53 PM, Eddie Chapman wrote: >>> On 27/09/18 16:23, Coly Li wrote: On 9/27/18 9:45 PM, guoju wrote: > After write SSD completed, bcache schedule journal_write work to > system_wq, tha

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-10-04 Thread Eddie Chapman
On 28/09/18 03:32, Coly Li wrote: On 9/27/18 11:53 PM, Eddie Chapman wrote: On 27/09/18 16:23, Coly Li wrote: On 9/27/18 9:45 PM, guoju wrote: After write SSD completed, bcache schedule journal_write work to system_wq, that is a public workqueue in system, without WQ_MEM_RECLAIM flag. s

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Coly Li
On 9/27/18 11:53 PM, Eddie Chapman wrote: On 27/09/18 16:23, Coly Li wrote: On 9/27/18 9:45 PM, guoju wrote: After write SSD completed, bcache schedule journal_write work to system_wq, that is a public workqueue in system, without WQ_MEM_RECLAIM flag. system_wq is also a bound wq, and there

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Coly Li
Hi Stefan, This bug was triggered by following condition: 1, few system memory available to allocate 2, journal delayed its operations to system_wq, which needs to allocate memory to execute. 3, Due to lack of memory, kernel starts to reclaim system memory, and trigger writeback to file sys

[PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Stefan Priebe - Profihost AG
Hi Coly, is this the deadlock I reported some weeks ago? Greets, Stefan Excuse my typo sent from my mobile phone. Am 27.09.2018 um 17:53 schrieb Eddie Chapman mailto:ed...@ehuk.net>>: > On 27/09/18 16:23, Coly Li wrote: >> On 9/27/18 9:45 PM, guoju wrote: >>> After write SSD completed, bcache

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Eddie Chapman
On 27/09/18 16:23, Coly Li wrote: On 9/27/18 9:45 PM, guoju wrote: After write SSD completed, bcache schedule journal_write work to system_wq, that is a public workqueue in system, without WQ_MEM_RECLAIM flag. system_wq is also a bound wq, and there may be no idle kworker on current processor.

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Coly Li
On 9/27/18 9:45 PM, guoju wrote: After write SSD completed, bcache schedule journal_write work to system_wq, that is a public workqueue in system, without WQ_MEM_RECLAIM flag. system_wq is also a bound wq, and there may be no idle kworker on current processor. Creating a new kworker may unfortu

[PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread guoju
After write SSD completed, bcache schedule journal_write work to system_wq, that is a public workqueue in system, without WQ_MEM_RECLAIM flag. system_wq is also a bound wq, and there may be no idle kworker on current processor. Creating a new kworker may unfortunately need to reclaim memory first,