• Konstantin Khlebnikov's avatar
    mm, writeback: flush plugged IO in wakeup_flusher_threads() · 51350ea0
    Konstantin Khlebnikov authored
    I've found funny live-lock between raid10 barriers during resync and
    memory controller hard limits. Inside mpage_readpages() task holds on to
    its plug bio which blocks the barrier in raid10. Its memory cgroup have
    no free memory thus the task goes into reclaimer but all reclaimable
    pages are dirty and cannot be written because raid10 is rebuilding and
    stuck on the barrier.
    Common flush of such IO in schedule() never happens, because the caller
    doesn't go to sleep.
    Lock is 'live' because changing memory limit or killing tasks which
    holds that stuck bio unblock whole progress.
    That was what happened in 3.18.x but I see no difference in upstream
    logic.  Theoretically this might happen even without memory cgroup.
    Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
fs-writeback.c 70.4 KB