lkml.org 
[lkml]   [2021]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/5] mm/vmscan: Throttle reclaim until some writeback completes if congested
Date
On Mon, 20 Sep 2021, Mel Gorman wrote:
> -long wait_iff_congested(int sync, long timeout)
> -{
> - long ret;
> - unsigned long start = jiffies;
> - DEFINE_WAIT(wait);
> - wait_queue_head_t *wqh = &congestion_wqh[sync];
> -
> - /*
> - * If there is no congestion, yield if necessary instead
> - * of sleeping on the congestion queue
> - */
> - if (atomic_read(&nr_wb_congested[sync]) == 0) {
> - cond_resched();
> -
> - /* In case we scheduled, work out time remaining */
> - ret = timeout - (jiffies - start);
> - if (ret < 0)
> - ret = 0;
> -
> - goto out;
> - }
> -
> - /* Sleep until uncongested or a write happens */
> - prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE);

Uninterruptible wait.

....
> +static void
> +reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason,
> + long timeout)
> +{
> + wait_queue_head_t *wqh = &pgdat->reclaim_wait;
> + unsigned long start = jiffies;
> + long ret;
> + DEFINE_WAIT(wait);
> +
> + atomic_inc(&pgdat->nr_reclaim_throttled);
> + WRITE_ONCE(pgdat->nr_reclaim_start,
> + node_page_state(pgdat, NR_THROTTLED_WRITTEN));
> +
> + prepare_to_wait(wqh, &wait, TASK_INTERRUPTIBLE);

Interruptible wait.

Why the change? I think these waits really need to be TASK_UNINTERRUPTIBLE.

Thanks,
NeilBrown

\
 
 \ /
  Last update: 2021-09-21 02:16    [W:0.219 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site