[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55103302.8090307@kernel.dk>
Date: Mon, 23 Mar 2015 09:36:34 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Tejun Heo <tj@...nel.org>
CC: Jan Kara <jack@...e.cz>, Wu Fengguang <fengguang.wu@...el.com>,
Greg Thelen <gthelen@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH linux-block/for-linus] writeback: fix possible underflow
in write bandwidth calculation
On 03/22/2015 10:18 PM, Tejun Heo wrote:
> From 1ebf33901ecc75d9496862dceb1ef0377980587c Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@...nel.org>
> Date: Mon, 23 Mar 2015 00:08:19 -0400
>
> 2f800fbd777b ("writeback: fix dirtied pages accounting on redirty")
> introduced account_page_redirty() which reverts stat updates for a
> redirtied page, making BDI_DIRTIED no longer monotonically increasing.
>
> bdi_update_write_bandwidth() uses the delta in BDI_DIRTIED as the
> basis for bandwidth calculation. While unlikely, since the above
> patch, the newer value may be lower than the recorded past value and
> underflow the bandwidth calculation leading to a wild result.
>
> Fix it by subtracing min of the old and new values when calculating
> delta. AFAIK, there hasn't been any report of it happening but the
> resulting erratic behavior would be non-critical and temporary, so
> it's possible that the issue is happening without being reported. The
> risk of the fix is very low, so tagged for -stable.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: Jan Kara <jack@...e.cz>
> Cc: Wu Fengguang <fengguang.wu@...el.com>
> Cc: Greg Thelen <gthelen@...gle.com>
> Fixes: 2f800fbd777b ("writeback: fix dirtied pages accounting on redirty")
> Cc: stable@...r.kernel.org
Added for this round, thanks Tejun.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists