1. Oct 05, 2018
  2. Oct 04, 2018
  3. Oct 03, 2018
  4. Oct 02, 2018
  5. Sep 30, 2018
  6. Sep 29, 2018
  7. Sep 28, 2018
  8. Sep 27, 2018
    • Guoju Fang's avatar
      bcache: add separate workqueue for journal_write to avoid deadlock · 0f843e65
      Guoju Fang authored
      
      
      After write SSD completed, bcache schedules journal_write work to
      system_wq, which 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, by shrinking cache and slab used by vfs, which
      depends on bcache device. That's a deadlock.
      
      This patch create a new workqueue for journal_write with WQ_MEM_RECLAIM
      flag. It's rescuer thread will work to avoid the deadlock.
      
      Signed-off-by: default avatarGuoju Fang <fangguoju@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarColy Li <colyli@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0f843e65