Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752181AbdGFPCj (ORCPT ); Thu, 6 Jul 2017 11:02:39 -0400 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:34666 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbdGFPCi (ORCPT ); Thu, 6 Jul 2017 11:02:38 -0400 Date: Thu, 6 Jul 2017 10:02:33 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Roman Gushchin cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Johannes Weiner , Michal Hocko , Vladimir Davydov , Rik van Riel , kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: make allocation counters per-order In-Reply-To: <1499346271-15653-1-git-send-email-guro@fb.com> Message-ID: References: <1499346271-15653-1-git-send-email-guro@fb.com> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfFijqJr92fwJbgBNpQo0rfW4t9BkHFuFZCBDBeYdAaGqTMYgGSlb40T4k0qPa6QVFeT6tmPloyDKcRnuHyk9jeSY7EmxZvmsIs5yX9m43JAePCAJ4+3J nfSaSQKlUD2KlIqkTp72kFMJ5n3RD8CRJ5WduMuejq40JZBsfAXzra8B/G1ViuKe/TQwE1uXxIyk5Pk8RvV/rtl6xw/YFQRm/7KVL0FImmemrGgv/zSDIpir /spSHF5tidRyWqYIMMv/e6Y4hxsdx2jC8/+2h6I2k8i+AIzb3Ig/i+Ldng3cqlNuLQVOij9x8ReSo6WnzQq95GALb2sHgAo1wu8+5hPU5XPOl6OgR9leXZR+ v3vYD/VK9x0ZfXM7bkzacG196HCI60UdziHnYvQ8bf4ZUFjramjMlxcKz+qLVnhxdyXXNbFog7FLxIn5unOl0joxJEIqhQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 554 Lines: 13 On Thu, 6 Jul 2017, Roman Gushchin wrote: > +#define PGALLOC_EVENTS_SIZE (MAX_NR_ZONES * MAX_ORDER) > +#define PGALLOC_EVENTS_CUT_SIZE (MAX_NR_ZONES * (MAX_ORDER - 1)) > +#define PGALLOC_FIRST_ZONE (PGALLOC_NORMAL - ZONE_NORMAL) You are significantly increasing the per cpu counters (ZONES * MAX_ORDER * cpus!!!). This will increase the cache footprint of critical functions significantly and thus lead to regressions. Typically counters for zones are placed in the zone structures but you would also significantly increase the per zone counters ...