Received: by 10.223.185.116 with SMTP id b49csp997904wrg; Fri, 16 Feb 2018 10:31:59 -0800 (PST) X-Google-Smtp-Source: AH8x226DpQJ6Ef5qsET4kqyFFXFawy6abN1MKHAevRA0aenjmk4Z1PUGcHMu0DJIAtAjnM6EDZTW X-Received: by 2002:a17:902:34f:: with SMTP id 73-v6mr6468179pld.55.1518805919413; Fri, 16 Feb 2018 10:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518805919; cv=none; d=google.com; s=arc-20160816; b=0W4/UhmCclqbBt4MUpH/JRSdQPG09yHFWmGVPIreGsORHPhiWFdOKLO5mkJxC2/JRc cqoPLCqTm+IcqBKjrz9ZhcDh0y0Gc2D/UKVLZPXv/SFQjkYWD25lrk28Pr+BmilEYML5 zjpqUpKOar1bB8scfcrbCR7DY1jQ+78uejU3hBFt1/ecvbk9qJJTG8OKblPZjuWXMGPf 3b1Vited2NIwED7DmNB4A/mpWdfXgvetWvTGEtgiYb8lsubA756lOnW0aII1WBRaqZZn lsuvHtCOlk3pSQwn8lGa8nJDP9OlfypkaxHnukWWQLmGF0+YAeGA77yIcGkYcJywbANU Oeqg== 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:dkim-signature :arc-authentication-results; bh=LhdaC/3TITVe20geHquS35pmnJ4VIXWTXxkbikuaobA=; b=Bexe8orFsh4TXzffZ6wIU75GdFPYR3VW0mjfbdxnNJYW+Y0tZhc0JZrkJXuOrn5Y7R GDL9mp3GwNcNAUY23EviXY4kSgZgbUpLEnqm3g4u1zbivuDaU5jfDoVFCj8ltivBPzc/ vuiesKT2oQy95wfPXASUiMe9AJcs1X8kdG4MYtKpWE03aLtLzT+0Cx+becX1nTJTcJJe Gr1jmKXRzM7/dKppzYFkHQzpTqUGRBkJUh7Dwrt22DLSuvqMULcdmMJsp7cRkdvQ4dFY ALBVraUaZi+URAws3RjiGQM/qSBGTXly/zNaOaUjTgsUB3XdAFY1hUmK8Bkc2vHjx0/C eyWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W9HFtIi0; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si1681934pgr.31.2018.02.16.10.31.44; Fri, 16 Feb 2018 10:31:59 -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=pass header.i=@google.com header.s=20161025 header.b=W9HFtIi0; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756824AbeBPApH (ORCPT + 99 others); Thu, 15 Feb 2018 19:45:07 -0500 Received: from mail-io0-f179.google.com ([209.85.223.179]:40791 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752984AbeBPApF (ORCPT ); Thu, 15 Feb 2018 19:45:05 -0500 Received: by mail-io0-f179.google.com with SMTP id t22so2623913ioa.7 for ; Thu, 15 Feb 2018 16:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=LhdaC/3TITVe20geHquS35pmnJ4VIXWTXxkbikuaobA=; b=W9HFtIi02x9Pm23LstuVLgy7BjHFEE+FJEOhZa00WVBcG0QafewVspBFPWgb3ytzzW cHd25cv4k6taj3nNfwAa87EctVrxHcbudo6Zo3AAgeLZtdTm3a3nsigdPYWU71GIL9AC UsgCpt/HUbbhRC+VuS7XZHF79y7Hi2fgW3U9N+r+W14+bNeutrlXoR/4N5YSOi0FkH/o LGBMUZiI2+LrWjW4cNkrDHJuPRmqJZz5wPjCgked4h12hBNOvHkxOfSVDAPXvJ5OaYg1 AAvVAVujkF/q2xKqaX7+PQsAg23w+1c8IbTlWQK4HARRj/4zzlig+HseIyt60TmuMfpS TtkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=LhdaC/3TITVe20geHquS35pmnJ4VIXWTXxkbikuaobA=; b=iDRgql4Z1w7n7ZIa38bgbnPUm8nD3MLJntKSg/VZkpUE5c2FcHDUzx7GvP8frx/POs JAFN1SuYXAICd6IV6e9V/T3deYM5Fap1RgRMUsIeDy8umwxfDEMLFPNodw8wrN27/mwQ QDlvMK62GiPR+If4Ot6J+ylsCEnxul/wbzzJxbK7CclPNkR+5LX13fLp2rlzXeiJvx8X Er+mUESvV0o/9C4yvOitmRiEYriMW3P3n+0BkNKozeayZ1SsCOMaqxAA2erddsoCqhnr IaoAUg02c+NlHxCJ06gXQtzBDHsZQk7aSB/KP5AqdwBywC9zVyjAJLYs/8pnXuKPN7EN O4vg== X-Gm-Message-State: APf1xPAcGWRIaFlSxk2fP1WT+XokkRrPTmto2LgwXyigN04goqfr7kpB Q34E4vN4luEYzy2K4uy8NKCTeg== X-Received: by 10.107.83.12 with SMTP id h12mr5710992iob.277.1518741904482; Thu, 15 Feb 2018 16:45:04 -0800 (PST) Received: from [2620:15c:17:3:550f:5c57:9fcd:1960] ([2620:15c:17:3:550f:5c57:9fcd:1960]) by smtp.gmail.com with ESMTPSA id m203sm3747487ioa.30.2018.02.15.16.45.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 16:45:03 -0800 (PST) Date: Thu, 15 Feb 2018 16:45:02 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Matthew Wilcox cc: Christopher Lameter , Michal Hocko , 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.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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. > A type of memory arena built between the page allocator and slab allocator. The issue that I see with this is eventually there's going to be low on memory situations where memory needs to be reclaimed from these arena pages. We can free individual pages back to the buddy allocator, but have no control over whether an entire pageblock can be freed back. So now we have MIGRATE_MOVABLE or MIGRATE_UNMOVABLE pageblocks with some user pages and some slab pages, and we've reached the same fragmentation issue in a different way. After that, it will become more difficult for the slab allocator to request a page of pageblock_order. Other than the stranding issue of MIGRATE_UNMOVABLE pages on pcps, the page allocator currently does well in falling back to other migratetypes but there isn't any type of slab reclaim or defragmentation done in the background to try to free up as much memory from that now-MIGRATE_UNMOVABLE pageblock as possible. We have patches that do that, but as I mentioned before it can affect the performance of the page allocator because it drains pcps on fallback and it does kcompactd compaction in the background even if you don't need order-9 memory later (or you've defragmented needlessly when more slab is just going to be allocated anyway).