Received: by 10.223.185.116 with SMTP id b49csp1039923wrg; Fri, 16 Feb 2018 11:17:33 -0800 (PST) X-Google-Smtp-Source: AH8x227XoUZWeANO55gf8RQPCiEn3L7MEcM61w4Pi5Nvxck0Mfoy3env3/S22rXgr+uxvXGXIKS1 X-Received: by 10.99.61.75 with SMTP id k72mr5773360pga.384.1518808653252; Fri, 16 Feb 2018 11:17:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518808653; cv=none; d=google.com; s=arc-20160816; b=iHNPMgsN+t+F4ddsfF7bBwLLhsjde4KBL43Mq42QybhvVqcF9tNXsOPUbvncXM5zfe tQdB76FQEtc2A67iIFJAT9xNi4KiEXo2ODF5aJRexFJ1e4FgXu1pUqhH5wOS00BJCCDJ 4Bhi+9b22c7Lo3dmN70NnIGU3EIVVIWeEFb+e3oeuo6N+YEBwbataOyxWCsphFk3izQv gBF5d9vnOIJZQn1P8XldiAhFTJL8D/wshQWCunlhFjV+klYT11Kr7muNnxBTX+aOQ9MY 7rXGmREXWSx45WTwO0EZ+vS7KoryY5HYHAz6cWYUT548vW5z6ubVMT/feCj1IErQYQqF qXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=N098HVp/B/mMZ3IyMifbv4JO0NN9+/ALiI6gLmZIuU0=; b=MA7cNdQLS7eneYMZ5dqtvuA17+u4aRfGlAO8ksFqAo5csg9Sk6p/tbtTy/bjr6QzQm pdPUYracAmEiTyre43P0TztIGStkOrOTLC8ihM9Rb0OlXwtwEyW+3PKtPfLTs6mr2YRA iIecu0mgdn1hkQoIHCsbhJYPoVxVYjsVPMXc1n0mtxC2kHGGNAnOWdVoLGCvVRB2Rycr h+AeujBcG7ru6s9ECO0dnjBIesoWPFH/I56/6/mdSEbCET2awym1qd0ozGsgmWb01xKd +YktMEhM56LDtVO/fKNVuOsaVi0810TajlZQlivrLbYjubmACFEsUCRgwlsQbPcsOA33 Jxyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=bOY1HkAt; 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 y1-v6si1792518pli.394.2018.02.16.11.17.18; Fri, 16 Feb 2018 11:17:33 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=bOY1HkAt; 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 S1758455AbeBPQBV (ORCPT + 99 others); Fri, 16 Feb 2018 11:01:21 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:46660 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758469AbeBPQBT (ORCPT ); Fri, 16 Feb 2018 11:01:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N098HVp/B/mMZ3IyMifbv4JO0NN9+/ALiI6gLmZIuU0=; b=bOY1HkAtoAn4e5gmVcrjHyt/W LUopuQ8GsQLQ8FHsnE4S6BRMuFHxXj9gcA0Ag5oymypJfFIxq9FgK4bqo7n2sPQLu7gZ8/MOu/4hz ApkP8aRopSEs1Dk2iVG4r3Ic8UgeE2BkHoJeN9plFXFA71NPNh1ZD53wMOJomIQM6gsvVHmNA0ZX+ CVRFov0+p1I1n0InudpfvTwvKqVKttAK80CykTt1HkwgoimVywD1/k5jiMIPHY+p7caCGY7PcDGRq YrdDvlOatt4Odwl0YhYbDX3UNOafiWlEsfyDnrcNoy3KlzwCgBSOAiSZeq3iQjjY6QGLpDxy6EE4Y TnpX7KfYw==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1emiRo-0004rO-FR; Fri, 16 Feb 2018 16:01:16 +0000 Date: Fri, 16 Feb 2018 08:01:16 -0800 From: Matthew Wilcox To: Christopher Lameter 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 Message-ID: <20180216160116.GA24395@bombadil.infradead.org> References: <20180214095911.GB28460@dhcp22.suse.cz> <20180215144525.GG7275@dhcp22.suse.cz> <20180215151129.GB12360@bombadil.infradead.org> <20180215204817.GB22948@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 16, 2018 at 09:44:25AM -0600, Christopher Lameter wrote: > On Thu, 15 Feb 2018, Matthew Wilcox wrote: > > What I was proposing was an intermediate page allocator where slab would > > request 2MB for its own uses all at once, then allocate pages from that to > > individual slabs, so allocating a kmalloc-32 object and a dentry object > > would result in 510 pages of memory still being available for any slab > > that needed it. > > Well thats not really going to work since you would be mixing objects of > different sizes which may present more fragmentation problems within the > 2M later if they are freed and more objects are allocated. I don't understand this response. I'm not suggesting mixing objects of different sizes within the same page. The vast majority of slabs use order-0 pages, a few use order-1 pages and larger sizes are almost unheard of. I'm suggesting the slab have it's own private arena of pages that it uses for allocating pages to slabs; when an entire page comes free in a slab, it is returned to the arena. When the arena is empty, slab requests another arena from the page allocator. If you're concerned about order-0 allocations fragmenting the arena for order-1 slabs, then we could have separate arenas for order-0 and order-1. But there should be no more fragmentation caused by sticking within an arena for page allocations than there would be by spreading slab allocations across all memory.