Received: by 10.223.185.116 with SMTP id b49csp1039199wrg; Fri, 16 Feb 2018 11:16:40 -0800 (PST) X-Google-Smtp-Source: AH8x227sCZQRuAjvoZZxF8q8uyljlr0K3jGDJXSsDjBd7sSC2BJEexoZCggEtDaAjLjUURnKsSSz X-Received: by 10.99.109.77 with SMTP id i74mr5795424pgc.73.1518808600774; Fri, 16 Feb 2018 11:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518808600; cv=none; d=google.com; s=arc-20160816; b=GLU9/sLUDObJ/pbLcYOE6MP291h2YwtgRkiSw6n19pr4n0stnl4Cl5+Uwk6zBKmEYN XLu1vHw2D000XueGadEZc6yZgk1GWqU3b8MZwgJDfoPmpYi1az6iExwFLPNoBbRJcYFm 6/7LIMYySkgT2VSStoVK42OM2/zxMV2WksswBlMZg4sIAdEIrajBsDUIhXm+i6u4FUjx 1rBIkqGzvRqJSCew6VixDNTrk5yzpCiArnpTBxOYovL6BNX8CHcLfd10dZqTqJMFI73/ OJ3G/+Ayo8czSUkBKtNXr11GW16+d3AwjcT90c35mPppRgMbcogaoZTxMu8aStCvON6V Eyqw== 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=e/MdD/2hlPEK8Fn13omLSsVrICFDst6MxvIaZ7oto3M=; b=QPb5B284dX0/F6m+XxcDPa8BI4ma2Tb6L9i78AgkxdwWatXFKyltfBJF8m1a8HmbZA G+2XYWEv86AAgpfWdHLGeRwhGTN3qk3rDZ1mTmQ5xPNF5WxDvtTE7UJI8v1blDP0CZ0q Gyj8qyDvYhAJDsomFWDMzCmdT0zo1YdxZaPk2450vs+tTqE3X2LffE6adI9nlppE1H0y JFIGmQxpeckHKF49jXSQMkNyrGboxBwt8Mymks6hCJ66+ciLZG9uIF1vYd4xN582gwQ5 TJg8SaPR6MW1AYiJkM2h+TqcOiB6+WJyz/7oExx8R54BdDcpmcxpcFJEUXrY70fQyaUz Ep5A== 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 79si1668967pfn.282.2018.02.16.11.16.26; Fri, 16 Feb 2018 11:16:40 -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 S1756638AbeBPPo3 (ORCPT + 99 others); Fri, 16 Feb 2018 10:44:29 -0500 Received: from resqmta-ch2-12v.sys.comcast.net ([69.252.207.44]:46454 "EHLO resqmta-ch2-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756467AbeBPPo2 (ORCPT ); Fri, 16 Feb 2018 10:44:28 -0500 Received: from resomta-ch2-19v.sys.comcast.net ([69.252.207.115]) by resqmta-ch2-12v.sys.comcast.net with ESMTP id miALejEkC7BvsmiBXelV3u; Fri, 16 Feb 2018 15:44:27 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-19v.sys.comcast.net with SMTP id miBVeLliZPJ76miBWeBrpd; Fri, 16 Feb 2018 15:44:27 +0000 Received: by gentwo.org (Postfix, from userid 1001) id B1B3F116016D; Fri, 16 Feb 2018 09:44:25 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id AC42C116013F; Fri, 16 Feb 2018 09:44:25 -0600 (CST) Date: Fri, 16 Feb 2018 09:44:25 -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: <20180215204817.GB22948@bombadil.infradead.org> Message-ID: References: <20180214095911.GB28460@dhcp22.suse.cz> <20180215144525.GG7275@dhcp22.suse.cz> <20180215151129.GB12360@bombadil.infradead.org> <20180215204817.GB22948@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: MS4wfMClK1qe20MO0855Dd54Hu4F0TGxZcw71Jb05oECT9RPVW4iOlGFOOmhezR1WCr9eKe4f2CO0nux6Ni7nGBAKU9OEg09yBSf6sdLI119rouJqjCndXsp GqdbZkV9WRxpWSFc6wzN9zDi4r8rUkiiqXlajGbKJutL5Kodq2xjFk2Z7aE+CPYgoNJKmcNsbbNOpSvjKaZ5efo9OM6Jh3teA+ROA4gOoUW7pTqwzvURiwM5 A1hpBKYiiKOrWo+26u18uVLcWMybHecPusrbSDiNUvWeMfr0ngpwxsZ4ZkVgCBzaSKVx2DwfKlElSmNySkPwfp30UHoKnotqLmXT+wcGUwqqi2NQj7eGIZcs togQtEtKkZp14MH74+/UvEUvj9mVuA3UazkMsUoY7uQAcMsmhRu10d9kLMh29vPk7ZaGszP9q3veoVYQAM/7cO2b/Hxf+A== 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: > > 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. > > This is subtly different from the idea that I had. If you set > slub_min_order to 9, then slub will allocate 2MB pages for each slab, > so allocating one object from kmalloc-32 and one object from dentry will > cause 4MB to be taken from the system. Right. > 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. What we could do is add a readonly allocation mode for those objects for which we know that are never freed. Those could be combined into 2M blocks. Or an allocation mode where we would free a whole bunch of objects in one go. If we can mark those allocs then they could be satisfied from the same block.