lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 12 Dec 2016 13:59:07 +0800 From: Jia He <hejianet@...il.com> To: linux-mm@...ck.org, linux-kernel@...r.kernel.org Cc: Andrew Morton <akpm@...ux-foundation.org>, Vlastimil Babka <vbabka@...e.cz>, Mel Gorman <mgorman@...hsingularity.net>, Michal Hocko <mhocko@...e.com>, Johannes Weiner <hannes@...xchg.org>, Joonsoo Kim <iamjoonsoo.kim@....com>, Taku Izumi <izumi.taku@...fujitsu.com>, Jia He <hejianet@...il.com> Subject: [PATCH RFC 1/1] mm, page_alloc: fix incorrect zone_statistics data In commit b9f00e147f27 ("mm, page_alloc: reduce branches in zone_statistics"), it reconstructed codes to reduce the branch miss rate. Compared with the original logic, it assumed if !(flag & __GFP_OTHER_NODE) z->node would not be equal to preferred_zone->node. That seems to be incorrect. Fixes: commit b9f00e147f27 ("mm, page_alloc: reduce branches in zone_statistics") Signed-off-by: Jia He <hejianet@...il.com> --- mm/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6de9440..474757e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2568,6 +2568,9 @@ static inline void zone_statistics(struct zone *preferred_zone, struct zone *z, if (z->node == local_nid) { __inc_zone_state(z, NUMA_HIT); __inc_zone_state(z, local_stat); + } else if (z->node == preferred_zone->node) { + __inc_zone_state(z, NUMA_HIT); + __inc_zone_state(z, NUMA_OTHER); } else { __inc_zone_state(z, NUMA_MISS); __inc_zone_state(preferred_zone, NUMA_FOREIGN); -- 2.5.5
Powered by blists - more mailing lists