Received: by 10.223.185.116 with SMTP id b49csp1857377wrg; Thu, 22 Feb 2018 04:24:26 -0800 (PST) X-Google-Smtp-Source: AH8x225O2vY1iYU3aWxBvqWxT6tZTaQKUl+cNH8ktFw43rG7jxaQIR9+Pno/DzOXW6x73yckHlre X-Received: by 10.99.120.193 with SMTP id t184mr5658251pgc.348.1519302266721; Thu, 22 Feb 2018 04:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519302266; cv=none; d=google.com; s=arc-20160816; b=vLeQxMNAJD3nwXb7UmJg3bZsNF4SF73JsYLDiB6DdsOrTPq8tPNNNQno5DxMWZQ6GH 4ojf/HrRxMeyp+uu2DEjjKmAahUMQ/3rME3PeWhuPgQBrBouym2lk+dhoZImq37MpW2s wpEeWSc6sEUZxrGXvM+a/sfzTbuwCYNHzqekYeyu7hCAUCruJJIww5uKKaHvqm5Ev4qN +4yZSBWuPl6e4eEHAjzOJoyE7A2GzLkawRbugmNLUmb0JZkn4Rn9YKblpaAXwA5TbBuu ZRJMYkvKew5XH+OYfWgUB5tWM0GAPZQBWULpx/v9sVb1rJG+ET0XzH+CvengqmNg/P7n XUmw== 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=o0jlAa74EDax+RdiEtTrBIzHplYuzLvp0bilKSJU/Yg=; b=MpzMCR/Vx6RRBJHQagd0wGbTPo/QEyRyk8VvkbGJWml0pStY8T6KYny8BR+Asr9YN9 XCLiYEAjjzOasREEe3f0hIturwjmcVLq8HzzTK+km+0qPozv5wH5mGRvVbtanng8WER2 +abYeVIPqrEMIzdtDwPR0nO8/O8jL/hzZDj2bzdJorFGANbfUjjJC867+7AhTasgXbG4 gBvUbLsst12zZKuTYGCDXmKz0SCMPPd/RG7V1HUOD9QFlHlqXAZdNVncFPmqo7+gubw3 nx0qx7cdQWgnxJH8OL28yW7pizHce29/swf3lcTKZ5b/Hxp6JM8/LmMSGyUioy4FXAam 0cUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=LJeP6lIr; 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 u19-v6si2886366plq.120.2018.02.22.04.24.11; Thu, 22 Feb 2018 04:24:26 -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=LJeP6lIr; 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 S932201AbeBVMXE (ORCPT + 99 others); Thu, 22 Feb 2018 07:23:04 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55734 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753570AbeBVMW5 (ORCPT ); Thu, 22 Feb 2018 07:22:57 -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=o0jlAa74EDax+RdiEtTrBIzHplYuzLvp0bilKSJU/Yg=; b=LJeP6lIr9zoGbnqCFcA3WXLN7 qjj7B/joNZGE16/GSiLB6rE/mQ1sipTSxi9TKV5SN6Wb1hKUmeYpQwYm76gvj6Nwm7wnGtefe/fKb YTQR+n5QQrchY0TC1BSwF0AxnjmW0VXsSt2gSxZdIL77/Yytl5q7yo8dmWnM33XZWeo4jQc3IEjL0 VJc7MksEPclIEt/2hLt0XN2JYiyPr5P7kofP6wZavJrJIvDo29AGlQywYYABRKQN62S5OrwguINGn V+IoG9lMrHqgrXs3tsNhSM/KFFeAD3S+ZMJng1k303sMnhrdmzD9U0VhlIqAHmXXsQFdgRh+m2v/i fswNC20WQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1eoptm-0006vT-UG; Thu, 22 Feb 2018 12:22:54 +0000 Date: Thu, 22 Feb 2018 04:22:54 -0800 From: Matthew Wilcox To: Michal Hocko Cc: Dave Hansen , Konstantin Khlebnikov , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Andy Lutomirski , Andrew Morton , "Kirill A. Shutemov" Subject: Re: Use higher-order pages in vmalloc Message-ID: <20180222122254.GA22703@bombadil.infradead.org> References: <151670492223.658225.4605377710524021456.stgit@buzz> <151670493255.658225.2881484505285363395.stgit@buzz> <20180221154214.GA4167@bombadil.infradead.org> <20180221170129.GB27687@bombadil.infradead.org> <20180222065943.GA30681@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222065943.GA30681@dhcp22.suse.cz> 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 Thu, Feb 22, 2018 at 07:59:43AM +0100, Michal Hocko wrote: > On Wed 21-02-18 09:01:29, Matthew Wilcox wrote: > > Right. It helps with fragmentation if we can keep higher-order > > allocations together. > > Hmm, wouldn't it help if we made vmalloc pages migrateable instead? That > would help the compaction and get us to a lower fragmentation longterm > without playing tricks in the allocation path. I was wondering about that possibility. If we want to migrate a page then we have to shoot down the PTE across all CPUs, copy the data to the new page, and insert the new PTE. Copying 4kB doesn't take long; if you have 12GB/s (current example on Wikipedia: dual-channel memory and one DDR2-800 module per channel gives a theoretical bandwidth of 12.8GB/s) then we should be able to copy a page in 666ns). So there's no problem holding a spinlock for it. But we can't handle a fault in vmalloc space today. It's handled in arch-specific code, see vmalloc_fault() in arch/x86/mm/fault.c If we're going to do this, it'll have to be something arches opt into because I'm not taking on the job of fixing every architecture! > Maybe we should consider kvmalloc for the kernel stack? We'd lose the guard page, so it'd have to be something we let the sysadmin decide to do.