Received: by 10.223.185.116 with SMTP id b49csp1931982wrg; Thu, 22 Feb 2018 05:38:10 -0800 (PST) X-Google-Smtp-Source: AH8x227LQ+noHiGiLR7bo06kA63Y6IFd/CuESHrwgV7JJuRG5oWsa3lhpMyM3DG4DtNdXisIQhVi X-Received: by 10.98.70.89 with SMTP id t86mr6995408pfa.215.1519306690278; Thu, 22 Feb 2018 05:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519306690; cv=none; d=google.com; s=arc-20160816; b=nnXlsxPN2LeWjSDCivVdCAGlWs0n89AECLhldA1nFKiCBZ5dqokoBp7olIoL+i2bMt sR6iiQ0osOhji9vT/3Vmw5++Ftw9yTh+sJetJ2nhmsyYqx+51dBuWu+NmhDr9V3bTc6r ZvzraU0f5EWjfwfnNs5yCxIiQ5STTxgk4A+5jmoUiLX5IrFAFOZrhhlMi9RMLxphr7yZ cF6RrrrYaxbuDh7c/EuVQ4MtawwhsqrYdRAbMJ3MdU5H79bdH3FAvk23rntOrpWl0aP7 s4nc+cTXpk9zjcHlxjmqjHSzY8hk/mSJ+peLbhC1Dt8XjP3HxJ6ggxdwCCyQO3MFf3MU ykxw== 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:arc-authentication-results; bh=roQdAzJYv416GQ2hU8oV6Rc6MBE5nVZ8xxx6iLmFUX0=; b=QGEjuExdLosAYPmQFj8zyLzDnX3vdesZuV5cwNFZHLm876FJ6FMQDS9Ux7ziFI/wkD gXI89gX8IDIn2eMijQYvspdfGkgCg9MElkLoQSc5CbEEy6n9MuS7uTdz2mYPPcsVbhUt XZMVsm3l48vg3UAEja/KKXda+bhvb2KCl5dx272va8J5qWdHVjfKZb8lhXdtRvhSoI/2 k98Pdt3rfzNSNiWsY+TSJHlYoKOHfYCA8TMfk9maw7T77Dqpd2rAjBDwezdQxPmNpqAg iStWEmAHnJ3gR9p5vcJ1SYgql0rCPgrE2wF37NgoOlILUAxANYMQFjPd7YOa36DKrxXK Z9Lg== 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 e124si39211pfe.170.2018.02.22.05.37.56; Thu, 22 Feb 2018 05:38:10 -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 S932606AbeBVNgu (ORCPT + 99 others); Thu, 22 Feb 2018 08:36:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:48221 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932356AbeBVNgq (ORCPT ); Thu, 22 Feb 2018 08:36:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C2D25AE28; Thu, 22 Feb 2018 13:36:44 +0000 (UTC) Date: Thu, 22 Feb 2018 14:36:43 +0100 From: Michal Hocko To: Matthew Wilcox 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: <20180222133643.GJ30681@dhcp22.suse.cz> 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> <20180222122254.GA22703@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222122254.GA22703@bombadil.infradead.org> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 22-02-18 04:22:54, Matthew Wilcox wrote: > 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! yes. > > 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. ohh, right, I forgot about the guard page. -- Michal Hocko SUSE Labs