Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp8263ybk; Fri, 8 May 2020 16:53:19 -0700 (PDT) X-Google-Smtp-Source: APiQypKqjuESLFkl8j2eo7XOc//JKp+qZQoJ3O4s70cBdSpO15Mf+24GVcx3SVH5l1xmSllCRhzX X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr4258655edv.322.1588981999403; Fri, 08 May 2020 16:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588981999; cv=none; d=google.com; s=arc-20160816; b=XHFhuheUFsPAkyUuExiD0zCmseHipsCRt4Q1j7B+m4Hmu5/uyM4f+gdoJhenPtA/Fs Bal36wCZo0yVE6p7KuAIOO2X0z59+0AwE0gpwvNQ3guiVU8fuAfUBIf0F5qgE+BGafVc kA02MhtE2CbGCYcE2K8YulbOIhq+ApF0ZLx4/n4gExP3n1EJxe46YNMffmNmG0sVqknl meGo5m2zopYD+FA82nIj9BUr7hxvCKQsA8r4sc5tiwI+wmmgapJd1BH7wowO5lZdwyRf 5g+du6GpREJPihu9//VlBEhYKDtDJil79t11rVFw0M8bA/s9VyeGi+QDAlueAA4yjJ2f N9LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6gcgFDjBnJydE6l6w1ob8wzKPI5acY0t+OhoGOWd/LE=; b=XH6C2J2ozYpQM0pW24tAcJ18qwXGybJ938z7DGCvgDvdT+F5I0oa7hDzX+TRBj/J+e E6ZW9fSwa6el7KAk6B6lkTlr14OuBsD+YUB0+Q/TAqTrSlFxLNrYaI6ndk5MsCki2S86 LRKkJulQYOuGhFw9Ca8zyZ1sBWc+CyN9TFgw5naCVqkazmZ07z9ApHj2hulJSpf4fv2Q 2lvQ6Ye8XeFuJkwfwQwhh9ZdX/PWIWudTJ6qxxdZkTz3ZbO316SZxcT5ktiPyPoU9T4R 9wYv76TeUSa9NNboLocdHmQtnSGDk3AofwLOC7qxgtPIcXJel2zxMP+vHYlv+btWlDKC ZhnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Qgrr/ZVr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si1802161ejz.40.2020.05.08.16.52.54; Fri, 08 May 2020 16:53:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Qgrr/ZVr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728215AbgEHXtd (ORCPT + 99 others); Fri, 8 May 2020 19:49:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:50442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727959AbgEHXtb (ORCPT ); Fri, 8 May 2020 19:49:31 -0400 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B68B2496C for ; Fri, 8 May 2020 23:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588981771; bh=mIKkm78zlsFmzyNyUggpg/nLJ1Pv+yfyI9aRpBMvboY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Qgrr/ZVrtyMMSjMvGdjIv+FxJZuAng9m7yuTdoCTyOB79iIyIxJif4vCLsbkFNCoK qXIxL+QBwozjrrBbZe3ADXJGrf4sPvGFA4/sHOtcGrKlf1HKamC+RT5s3LctwL8pAQ ysSq0F9r3y6BM21/Dmx5hSBkWO5ZF2Tjj3znNxI0= Received: by mail-wm1-f42.google.com with SMTP id h4so11949277wmb.4 for ; Fri, 08 May 2020 16:49:31 -0700 (PDT) X-Gm-Message-State: AGi0PuYoQhQU+HJ5KNhujtFYAt/mZRdtCiE0VhMqOHfYQod9ZuE/WtE+ KksVdLaeHKBUnu7RmO8LoZBOHwM4/FEKtdszSI1/Sw== X-Received: by 2002:a1c:9989:: with SMTP id b131mr18252758wme.176.1588981769476; Fri, 08 May 2020 16:49:29 -0700 (PDT) MIME-Version: 1.0 References: <20200508144043.13893-1-joro@8bytes.org> <20200508213609.GU8135@suse.de> In-Reply-To: <20200508213609.GU8135@suse.de> From: Andy Lutomirski Date: Fri, 8 May 2020 16:49:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() To: Joerg Roedel Cc: Andy Lutomirski , Joerg Roedel , X86 ML , "H. Peter Anvin" , Dave Hansen , Peter Zijlstra , "Rafael J. Wysocki" , Arnd Bergmann , Andrew Morton , Steven Rostedt , Vlastimil Babka , Michal Hocko , LKML , Linux ACPI , linux-arch , Linux-MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 8, 2020 at 2:36 PM Joerg Roedel wrote: > > On Fri, May 08, 2020 at 02:33:19PM -0700, Andy Lutomirski wrote: > > On Fri, May 8, 2020 at 7:40 AM Joerg Roedel wrote: > > > What's the maximum on other system types? It might make more sense to > > take the memory hit and pre-populate all the tables at boot so we > > never have to sync them. > > Need to look it up for 5-level paging, with 4-level paging its 64 pages > to pre-populate the vmalloc area. > > But that would not solve the problem on x86-32, which needs to > synchronize unmappings on the PMD level. What changes in this series with x86-32? We already do that synchronization, right? IOW, in the cases where the vmalloc *fault* code does anything at all, we should have a small bound for how much memory to preallocate and, if we preallocate it, then there is nothing to sync and nothing to fault. And we have the benefit that we never need to sync anything on 64-bit, which is kind of nice. Do we actually need PMD-level things for 32-bit? What if we just outlawed huge pages in the vmalloc space on 32-bit non-PAE? Or maybe the net result isn't much of a cleanup after all given the need to support 32-bit. > > > Joerg