diff mbox series

[7/8] mm/vmscan: Increase the timeout if page reclaim is not making progress

Message ID 20211008135332.19567-8-mgorman@techsingularity.net (mailing list archive)
State New, archived
Headers show
Series Remove dependency on congestion_wait in mm/ | expand

Commit Message

Mel Gorman Oct. 8, 2021, 1:53 p.m. UTC
Tracing of the stutterp workload showed the following delays

      1 usect_delayed=124000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=128000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=176000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=536000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=544000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=556000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=624000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=716000 reason=VMSCAN_THROTTLE_NOPROGRESS
      1 usect_delayed=772000 reason=VMSCAN_THROTTLE_NOPROGRESS
      2 usect_delayed=512000 reason=VMSCAN_THROTTLE_NOPROGRESS
     16 usect_delayed=120000 reason=VMSCAN_THROTTLE_NOPROGRESS
     53 usect_delayed=116000 reason=VMSCAN_THROTTLE_NOPROGRESS
    116 usect_delayed=112000 reason=VMSCAN_THROTTLE_NOPROGRESS
   5907 usect_delayed=108000 reason=VMSCAN_THROTTLE_NOPROGRESS
  71741 usect_delayed=104000 reason=VMSCAN_THROTTLE_NOPROGRESS

All the throttling hit the full timeout and then there was wakeup delays
meaning that the wakeups are premature as no other reclaimer such as
kswapd has made progress. This patch increases the maximum timeout.

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 mm/vmscan.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Vlastimil Babka Oct. 14, 2021, 3:39 p.m. UTC | #1
On 10/8/21 15:53, Mel Gorman wrote:
> Tracing of the stutterp workload showed the following delays
> 
>       1 usect_delayed=124000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=128000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=176000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=536000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=544000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=556000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=624000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=716000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       1 usect_delayed=772000 reason=VMSCAN_THROTTLE_NOPROGRESS
>       2 usect_delayed=512000 reason=VMSCAN_THROTTLE_NOPROGRESS
>      16 usect_delayed=120000 reason=VMSCAN_THROTTLE_NOPROGRESS
>      53 usect_delayed=116000 reason=VMSCAN_THROTTLE_NOPROGRESS
>     116 usect_delayed=112000 reason=VMSCAN_THROTTLE_NOPROGRESS
>    5907 usect_delayed=108000 reason=VMSCAN_THROTTLE_NOPROGRESS
>   71741 usect_delayed=104000 reason=VMSCAN_THROTTLE_NOPROGRESS
> 
> All the throttling hit the full timeout and then there was wakeup delays
> meaning that the wakeups are premature as no other reclaimer such as
> kswapd has made progress. This patch increases the maximum timeout.
> 
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/vmscan.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index e096e81dcbd8..7b54fec4072c 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1038,6 +1038,8 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason)
>  	 */
>  	switch(reason) {
>  	case VMSCAN_THROTTLE_NOPROGRESS:
> +		timeout = HZ/2;
> +		break;
>  	case VMSCAN_THROTTLE_WRITEBACK:
>  		timeout = HZ/10;
>  		break;
>
diff mbox series

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index e096e81dcbd8..7b54fec4072c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1038,6 +1038,8 @@  void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason)
 	 */
 	switch(reason) {
 	case VMSCAN_THROTTLE_NOPROGRESS:
+		timeout = HZ/2;
+		break;
 	case VMSCAN_THROTTLE_WRITEBACK:
 		timeout = HZ/10;
 		break;