Received: by 10.223.185.116 with SMTP id b49csp238741wrg; Thu, 15 Feb 2018 20:51:23 -0800 (PST) X-Google-Smtp-Source: AH8x225uflih63Jnw1xZlZIkFdupR3nalHzvPADGkJIE97tSr6JMaOe4F7wInYgipnb2fUWDe7zf X-Received: by 10.98.253.17 with SMTP id p17mr122406pfh.105.1518756683432; Thu, 15 Feb 2018 20:51:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518756683; cv=none; d=google.com; s=arc-20160816; b=q1ixWWpELJ9PhL6NA9E9kx6Ls9AmQoiTB1Qytz19RUGP5bGQBtzZTTxwPms08Yn9Xj TQEZtrV/jDR9u0MQ7k4WljEYo1RjNXutAT5zhVYCRFo1EXFGcTxL8vBt7oWmv+d23Dtb XB5TAlZ1HkX8pkM0g0cWY0rycxOe8aazKiMzxaxg4sNdxMJFi81GnVn4y2RjudQlkpIH LSjTO2WNMmOsOVJWa5ghqinI/MgetmO+A7tYtLEdbZp3C1CZYH6Qfi6jqwhrHPYCOLDG sW41g3WXZM+uW1bSnPkGDHlcvMfjTeyp1F/tB1A8YXOxArx0NP/GPmffRCYCH9CLDSd4 jkXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=se+LUODhuA7rn0LgmM4/J/fIXvQ+22Gprr0qVyHrMx4=; b=pLVRLWc1rjRT4HW+OV8l/ytFUv0XDjKhT8K916xGDE6ubT8TjsOZ8LubWS0J7eaMN+ etF17JClKPAfzOktS1c8As6ZRwWKjaD5Su6ipsjoP0cJG42g5xvd4aE6AgMN4X0VpXaD 7DmLQhPazUgwCDrrR9UzhOBdQWMOe4+OU+QlFqqQqKm5F/EmSPUu6COzon8SJZhL7f7B F5vXGq8nQJU1/7DYt5MVGqO2trHOl7lr/OwC04d7oB9juODo5BRf8azN4Dqy8m6iN3dy SwwlFER/yZkHeUAQaxGWL3JaaR8f8C+BBYShNOWrRyyLryrbJtv0XEBNnWJD55bYTsf3 ocGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16-v6si1853358pli.330.2018.02.15.20.51.09; Thu, 15 Feb 2018 20:51:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425113AbeBOPtE (ORCPT + 99 others); Thu, 15 Feb 2018 10:49:04 -0500 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:46602 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424663AbeBOPtC (ORCPT ); Thu, 15 Feb 2018 10:49:02 -0500 Received: from resomta-ch2-19v.sys.comcast.net ([69.252.207.115]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id mLmQeHA8G9nyFmLmQeQU2Q; Thu, 15 Feb 2018 15:49:02 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-19v.sys.comcast.net with SMTP id mLmOeGz5nPJ76mLmOe9w7z; Thu, 15 Feb 2018 15:49:02 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 85D5A116013F; Thu, 15 Feb 2018 09:49:00 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 83FD3116012E; Thu, 15 Feb 2018 09:49:00 -0600 (CST) Date: Thu, 15 Feb 2018 09:49:00 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Matthew Wilcox cc: Michal Hocko , David Rientjes , Andrew Morton , Jonathan Corbet , Vlastimil Babka , Mel Gorman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org Subject: Re: [patch 1/2] mm, page_alloc: extend kernelcore and movablecore for percent In-Reply-To: <20180215151129.GB12360@bombadil.infradead.org> Message-ID: References: <20180214095911.GB28460@dhcp22.suse.cz> <20180215144525.GG7275@dhcp22.suse.cz> <20180215151129.GB12360@bombadil.infradead.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfN5zxHWeIZ3rt2BEhgKJYILLFPJrDJ5/PssKICgWc1bjkd/DTDalksV7uoK9oo7vmblZaLejzMwL34BWQ3nPaDgSxBL51K7sFJjb7cyf1vqqzbholJuD 0IXMfkoFaiNWzkrycHVFiQAODTIxzsiKqEanbn4XCu7BIbmBEgEEjxvjxcdIrGmHR0zWPGI7+/GC1KwvNNZCnBH7Ej/Ao+TMw7yfGlZU51PD4ewutYpEpDQl ZuGf5LGyzTGLcMLw+9+thJpB/REdsLHD8ma1yD4yVb0wis0RfohhUdlsRBvj8GELVBz2xzus/OyrO1qj9IEsuwKUsBnaSkXkq0qMcjyoQsjFFfxJHyJMCi9m aFEw8c9xXU0IYO0M2uWufXnL1zk2I7MhpGps+sEHRXLriqWCQZAOlrJoFS24yVCRIcmersxs8zpGdC8iW2/hoXrPtODR4g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Feb 2018, Matthew Wilcox wrote: > What if ... on startup, slab allocated a MAX_ORDER page for itself. > It would then satisfy its own page allocation requests from this giant > page. If we start to run low on memory in the rest of the system, slab > can be induced to return some of it via its shrinker. If slab runs low > on memory, it tries to allocate another MAX_ORDER page for itself. The inducing of releasing memory back is not there but you can run SLUB with MAX_ORDER allocations by passing "slab_min_order=9" or so on bootup. > I think even this should reduce fragmentation. We could enhance the > fragmentation reduction by noticing when somebody else releases a page > that was previously part of a slab MAX_ORDER page and handing that page > back to slab. When slab notices that it has an entire MAX_ORDER page free > (and sufficient other memory on hand that it's unlikely to need it soon), > it can hand that MAX_ORDER page back to the page allocator. SLUB will release MAX_ORDER pages if they are completely free with the above configuration.