Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754763AbcK1PkI (ORCPT ); Mon, 28 Nov 2016 10:40:08 -0500 Received: from resqmta-po-09v.sys.comcast.net ([96.114.154.168]:33495 "EHLO resqmta-po-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754473AbcK1PkA (ORCPT ); Mon, 28 Nov 2016 10:40:00 -0500 Date: Mon, 28 Nov 2016 09:39:19 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Mel Gorman cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Johannes Weiner , Linux-MM , Linux-Kernel Subject: Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3 In-Reply-To: <20161127131954.10026-1-mgorman@techsingularity.net> Message-ID: References: <20161127131954.10026-1-mgorman@techsingularity.net> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfFzBorMu1BUD0nidRFapxDnAN3fE24Zvy1Ja546gl1Fc3cvyBvV/a/468I7s6w5p4LCKSg9lZOaDQbua4dVxqXc074mI/LcbNVCcvCmMy4toUF84BXM4 LbQgzI0oLipaMVou7/vThI4um/8aA3aRIgifcbsqDnYtO1/ZDqTk88D/cVyLv6gaeRw0J4nzmn0wr1WbeHT7jGd76wOt2x+X518VMlMo99NCl921Zx+gs4tF cS5qAFtI+rx1nqqUYV4F7t4Adrw1aeTEGA7/lPe3xmbieopxJ5RHe1CEbEZP0Tsfp09jPVIzoyvcKSL3IWtRE//BaDOxouLJ+Xlv/dX0pzsPSQeMg6yrE02q eyq0zIAf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1502 Lines: 26 On Sun, 27 Nov 2016, Mel Gorman wrote: > > SLUB has been the default small kernel object allocator for quite some time > but it is not universally used due to performance concerns and a reliance > on high-order pages. The high-order concerns has two major components -- > high-order pages are not always available and high-order page allocations > potentially contend on the zone->lock. This patch addresses some concerns > about the zone lock contention by extending the per-cpu page allocator to > cache high-order pages. The patch makes the following modifications Note that SLUB will only use high order pages when available and fall back to order 0 if memory is fragmented. This means that the effect of this patch is going to gradually vanish as memory becomes more and more fragmented. I think this patch is beneficial but we need to address long term the issue of memory fragmentation. That is not only a SLUB issue but an overall problem since we keep on having to maintain lists of 4k memory blocks in variuos subsystems. And as memory increases these lists are becoming larger and larger and more difficult to manage. Code complexity increases and fragility too (look at transparent hugepages). Ultimately we will need a clean way to manage the allocation and freeing of large physically contiguous pages. Reserving memory at booting (CMA, giant pages) is some sort of solution but this all devolves into lots of knobs that only insiders know how to tune and an overall fragile solution.