w.r.t: > 1) direct reclaims occurring quite frequently, resulting in delayed > file read requests > 2) direct reclaims falling into congestion_wait() even though no > congestion at the time, this results in video jitter. Backporting the following changes seemed to greatly improve these issues: -vmscan: synchronous lumpy reclaim should not call congestion_wait() -writeback: do not sleep on the congestion queue if there are no congested BDIs or if significant congestion is not being encountered in the current zone -vmscan: avoid setting zone congested if no page dirty w.r.t.: > 3) kswapd not reclaiming pages quickly enough due to falling into > congestion_wait() very often. (or stays in congestion_wait() for too long) The attached patch takes an idea from Mel Gorman's patch for "writeback: do not sleep on the congestion queue if there are no congested BDIs or if significant congestion is not being encountered in the current zone" and applies it around the congestion_wait() in balance_pgdat(). The idea is that if there is no congestion then avoid potentially wait for too long. Comments or alternate solutions would be appreciated. Thanks, Jeff Vanhoof