[Devel,vz7] mm: Revert accounting for WRITEBACK_TEMP in balance_dirty_pages

Submitted by Maxim Patlasov on March 2, 2017, 11:20 p.m.

Details

Message ID 148849681073.10635.9523949875178608410.stgit@maxim-thinkpad
State New
Series "mm: Revert accounting for WRITEBACK_TEMP in balance_dirty_pages"
Headers show

Commit Message

Maxim Patlasov March 2, 2017, 11:20 p.m.
We needn't to account WRITEBACK_TEMP in balance_dirty_pages anymore because
of "strictlimit" feature: fuse marks its bdi with BDI_CAP_STRICTLIMIT, so
balance_dirty_pages knows that for fuse it should always pay attention to
per-bdi limits and counters.

Kudos to Andrey Ryabinin for pointing out.

https://jira.sw.ru/browse/PSBM-60701
Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
---
 mm/page-writeback.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index fd900c0..fcc0c1b 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1534,8 +1534,7 @@  static void balance_dirty_pages(struct address_space *mapping,
 		 */
 		nr_reclaimable = global_page_state(NR_FILE_DIRTY) +
 					global_page_state(NR_UNSTABLE_NFS);
-		nr_dirty = nr_reclaimable + global_page_state(NR_WRITEBACK) +
-			global_page_state(NR_WRITEBACK_TEMP);
+		nr_dirty = nr_reclaimable + global_page_state(NR_WRITEBACK);
 
 		global_dirty_limits(&background_thresh, &dirty_thresh);
 

Comments

Andrey Ryabinin March 3, 2017, 9:07 a.m.
On 03/03/2017 02:20 AM, Maxim Patlasov wrote:
> We needn't to account WRITEBACK_TEMP in balance_dirty_pages anymore because
> of "strictlimit" feature: fuse marks its bdi with BDI_CAP_STRICTLIMIT, so
> balance_dirty_pages knows that for fuse it should always pay attention to
> per-bdi limits and counters.
> 
> Kudos to Andrey Ryabinin for pointing out.
> 
> https://jira.sw.ru/browse/PSBM-60701
> Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>

Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

> ---
>  mm/page-writeback.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index fd900c0..fcc0c1b 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -1534,8 +1534,7 @@ static void balance_dirty_pages(struct address_space *mapping,
>  		 */
>  		nr_reclaimable = global_page_state(NR_FILE_DIRTY) +
>  					global_page_state(NR_UNSTABLE_NFS);
> -		nr_dirty = nr_reclaimable + global_page_state(NR_WRITEBACK) +
> -			global_page_state(NR_WRITEBACK_TEMP);
> +		nr_dirty = nr_reclaimable + global_page_state(NR_WRITEBACK);
>  
>  		global_dirty_limits(&background_thresh, &dirty_thresh);
>  
>