From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by kanga.kvack.org (Postfix) with ESMTP id D68AC6B0099 for ; Fri, 13 Dec 2013 09:10:12 -0500 (EST) Received: by mail-ee0-f50.google.com with SMTP id c41so897556eek.23 for ; Fri, 13 Dec 2013 06:10:12 -0800 (PST) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id u49si1990073eep.127.2013.12.13.06.10.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Dec 2013 06:10:11 -0800 (PST) From: Mel Gorman Subject: [PATCH 1/7] mm: page_alloc: exclude unreclaimable allocations from zone fairness policy Date: Fri, 13 Dec 2013 14:10:01 +0000 Message-Id: <1386943807-29601-2-git-send-email-mgorman@suse.de> In-Reply-To: <1386943807-29601-1-git-send-email-mgorman@suse.de> References: <1386943807-29601-1-git-send-email-mgorman@suse.de> Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Andrew Morton , Dave Hansen , Rik van Riel , Linux-MM , LKML , Mel Gorman From: Johannes Weiner Dave Hansen noted a regression in a microbenchmark that loops around open() and close() on an 8-node NUMA machine and bisected it down to 81c0a2bb515f ("mm: page_alloc: fair zone allocator policy"). That change forces the slab allocations of the file descriptor to spread out to all 8 nodes, causing remote references in the page allocator and slab. The round-robin policy is only there to provide fairness among memory allocations that are reclaimed involuntarily based on pressure in each zone. It does not make sense to apply it to unreclaimable kernel allocations that are freed manually, in this case instantly after the allocation, and incur the remote reference costs twice for no reason. Only round-robin allocations that are usually freed through page reclaim or slab shrinking. Cc: Bisected-by: Dave Hansen Signed-off-by: Johannes Weiner Signed-off-by: Mel Gorman --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 580a5f0..f861d02 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1920,7 +1920,8 @@ zonelist_scan: * back to remote zones that do not partake in the * fairness round-robin cycle of this zonelist. */ - if (alloc_flags & ALLOC_WMARK_LOW) { + if ((alloc_flags & ALLOC_WMARK_LOW) && + (gfp_mask & GFP_MOVABLE_MASK)) { if (zone_page_state(zone, NR_ALLOC_BATCH) <= 0) continue; if (zone_reclaim_mode && -- 1.8.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org