Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445578 > unrolled thread

[PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix

Started byMel Gorman <mgorman@techsingularity.net>
First post2016-07-18 17:00 +0200
Last post2016-07-19 02:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix Mel Gorman <mgorman@techsingularity.net> - 2016-07-18 17:00 +0200
    Re: [PATCH 3/3] mm, vmstat: remove zone and node double accounting  by approximating retries -fix Johannes Weiner <hannes@cmpxchg.org> - 2016-07-18 18:20 +0200
    Re: [PATCH 3/3] mm, vmstat: remove zone and node double accounting  by approximating retries -fix Minchan Kim <minchan@kernel.org> - 2016-07-19 02:00 +0200

#1445578 — [PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix

FromMel Gorman <mgorman@techsingularity.net>
Date2016-07-18 17:00 +0200
Subject[PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix
Message-ID<rWibw-7xJ-25@gated-at.bofh.it>
As pointed out by Vlastimil, the atomic_add() functions are already assumed
to be able to handle negative numbers. The atomic_sub handling was wrong
anyway but this patch fixes it unconditionally.

This is a fix to the mmotm patch
mm-vmstat-remove-zone-and-node-double-accounting-by-approximating-retries.patch

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
 include/linux/mm_inline.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index d29237428199..bcc4ed07fa90 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -10,12 +10,8 @@ extern atomic_t highmem_file_pages;
 static inline void acct_highmem_file_pages(int zid, enum lru_list lru,
 							int nr_pages)
 {
-	if (is_highmem_idx(zid) && is_file_lru(lru)) {
-		if (nr_pages > 0)
-			atomic_add(nr_pages, &highmem_file_pages);
-		else
-			atomic_sub(nr_pages, &highmem_file_pages);
-	}
+	if (is_highmem_idx(zid) && is_file_lru(lru))
+		atomic_add(nr_pages, &highmem_file_pages);
 }
 #else
 static inline void acct_highmem_file_pages(int zid, enum lru_list lru,
-- 
2.6.4

[toc] | [next] | [standalone]


#1445621 — Re: [PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix

FromJohannes Weiner <hannes@cmpxchg.org>
Date2016-07-18 18:20 +0200
SubjectRe: [PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix
Message-ID<rWjqW-8vS-33@gated-at.bofh.it>
In reply to#1445578
On Mon, Jul 18, 2016 at 03:50:26PM +0100, Mel Gorman wrote:
> As pointed out by Vlastimil, the atomic_add() functions are already assumed
> to be able to handle negative numbers. The atomic_sub handling was wrong
> anyway but this patch fixes it unconditionally.
> 
> This is a fix to the mmotm patch
> mm-vmstat-remove-zone-and-node-double-accounting-by-approximating-retries.patch
> 
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

[toc] | [prev] | [next] | [standalone]


#1445942 — Re: [PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix

FromMinchan Kim <minchan@kernel.org>
Date2016-07-19 02:00 +0200
SubjectRe: [PATCH 3/3] mm, vmstat: remove zone and node double accounting by approximating retries -fix
Message-ID<rWqC6-4yl-17@gated-at.bofh.it>
In reply to#1445578
On Mon, Jul 18, 2016 at 03:50:26PM +0100, Mel Gorman wrote:
> As pointed out by Vlastimil, the atomic_add() functions are already assumed
> to be able to handle negative numbers. The atomic_sub handling was wrong
> anyway but this patch fixes it unconditionally.
> 
> This is a fix to the mmotm patch
> mm-vmstat-remove-zone-and-node-double-accounting-by-approximating-retries.patch
> 
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Minchan Kim <minchan@kernel.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web