Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2130947ybk; Mon, 11 May 2020 12:40:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHc3tGbjgkVkvO5bBlSc910GA5Ilj4RIKDzg2j/QmQ7S124ikzno1ZJfWiIQlo+46Fb+wC X-Received: by 2002:aa7:d495:: with SMTP id b21mr6390864edr.16.1589226039909; Mon, 11 May 2020 12:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589226039; cv=none; d=google.com; s=arc-20160816; b=tSTJn7TI5dIwNasTueOzjXt+2+75hzgK5zKixUtv6VQ7bkAzwBee5uZgMw7KwATf+m xCkrJGR+/ZOQDo/n1zuRQ+asQ9YEyx6c9Wk9d7QOI5MkNEhkF65cPd3ymjDCHVl/QhS8 OOlGNbphzZ5eEHXSc3ooQucez+AyOX2PSXZWTUwMjlANG9KwMf2KnJ4eZKl4dgD7eBbf SAmiFfUwfTRK2Ri1v0/saAsaEeR40/0z3+Jxn5HIyi6/yPmvwcOASWum5qVfMyuv+UUO cXGur2mZYeN5DdE6ujmMHDAtjR2pUII1zkMm4aNRP8yzbD+/m0x/DnaMTUSwxU8ADnfO IqbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=v1qEow1xr6Tl9HbXqv92zljMgDOgKRbT8DcK2r8augk=; b=Ro6oCqRc/29k2mTYn+tWNSTUkoKp8baN6Eqb3URv0FPFl/fxBzmHdwi2yFXJgix57T bBKZdMPc09h6ju4bmhHU/c+nKuJvVFa5IxKu93YWwLbgJzK5pf3J9lCSRVi5vymfa8c6 MIyPkN0tivyNIqZaFEBwaN+NmT5bGu6FnoB8zeDYX4qAyezmupVZA4HmKADDKAJpLrri 9eyhgFVVezHb3h8UILCeA1Do7NGwLGreKdTU8LAh+X21SRZX5h86zgiVBnhDgovmJjMI HdLIZ04O8k6ZGq8ih2dO4Ub8K64xVHXPPSzsMSYvVuCM23ogu2FQgOuPFEj+hjJMVX+k j7Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=plDyvByA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si7106159edd.207.2020.05.11.12.40.17; Mon, 11 May 2020 12:40:39 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=plDyvByA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731485AbgEKTgc (ORCPT + 99 others); Mon, 11 May 2020 15:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731243AbgEKTgc (ORCPT ); Mon, 11 May 2020 15:36:32 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8462C05BD09 for ; Mon, 11 May 2020 12:36:30 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id k19so4344574pll.9 for ; Mon, 11 May 2020 12:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=v1qEow1xr6Tl9HbXqv92zljMgDOgKRbT8DcK2r8augk=; b=plDyvByAezPxhtBNLRCuVK5NXRrexQXBfSR++YGjC0ACfezjvSTQ4rrVuyxXsCEEtI BbW2+qXKERUMz2XYA8LhCw/+uX3PWkPklugw6VNmlNZHrIV9ej6nD8FWRwEx4o/TnPww kdkwcs9KYpIuASMr/BNGVsia2pyZK0W8b74Y7BYxSeziRLkruJFJtlwWfB42Jb/9JiYn jpE//U7WrRm9hAm7hc+DTdNO5lt3CAdRHqXSFSO4ZA0Pcf/8p0ITa134SktFrq7OsKod PUhx3J9d5uROpjm74uAh0LSUBbPjFLkfCcx5a7c2NiuPxx+1GBDwMHyv2zsWWB661Y5j xlXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=v1qEow1xr6Tl9HbXqv92zljMgDOgKRbT8DcK2r8augk=; b=o+hq0FQZUruXU93XEsMEWyWJiFsRM02Y/R7ekriqpUrzokJ936vy1ER+R1Q04PAqum Cosjb2T7W2yu6Kkn4Iy8qq5YzDrYKy4mESREtvr2cvNQIhIFDOcQqP341kbmTqGq9mDL WabCOCyxCzriHIn+EzwJWY0RS55trD1mZH6urgomCufs2FvcyOXmXP06pRLBA9EEqqbx WX3RVVuHlwmia6NEg4eRfSXLVPUFVIBDxokXZAbaumfnKp2x2nb6HdQ1CumXPJNyzCX7 Pl6RM+zcppZYVdlN3R0Qc02O88OChlyx78tdq91SSpC5HTvEIIDryBYizyvrHG6l1WnN c3Ow== X-Gm-Message-State: AGi0PuZTmfZNPKbNhwGbllavn9z4HpuOxX7Y2L/KbuFqkjR/b7C0C2gn CkO/XImDCqGFsoyByE26FG+21Q== X-Received: by 2002:a17:902:8b86:: with SMTP id ay6mr16163755plb.338.1589225790091; Mon, 11 May 2020 12:36:30 -0700 (PDT) Received: from ?IPv6:2601:646:c200:1ef2:8:ac6e:cd4:7f73? ([2601:646:c200:1ef2:8:ac6e:cd4:7f73]) by smtp.gmail.com with ESMTPSA id u17sm4090429pgo.90.2020.05.11.12.36.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 12:36:29 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() Date: Mon, 11 May 2020 12:36:19 -0700 Message-Id: <8D6745B7-0EC2-4FCC-B6FC-E7E1557EB18E@amacapital.net> References: <20200511191414.GY8135@suse.de> Cc: Andy Lutomirski , Peter Zijlstra , Joerg Roedel , X86 ML , "H. Peter Anvin" , Dave Hansen , "Rafael J. Wysocki" , Arnd Bergmann , Andrew Morton , Steven Rostedt , Vlastimil Babka , Michal Hocko , LKML , Linux ACPI , linux-arch , Linux-MM In-Reply-To: <20200511191414.GY8135@suse.de> To: Joerg Roedel X-Mailer: iPhone Mail (17E262) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 11, 2020, at 12:14 PM, Joerg Roedel wrote: >=20 > =EF=BB=BFOn Mon, May 11, 2020 at 08:36:31AM -0700, Andy Lutomirski wrote: >> What if we make 32-bit PTI depend on PAE? >=20 > It already does, PTI support for legacy paging had to be removed because > there were memory corruption problems with THP. The reason was that huge > PTEs in the user-space area were mapped in two page-tables (kernel and > user), but A/D bits were only fetched from the kernel part. To not make > things more complicated we agreed on just not supporting PTI without > PAE. >=20 >> And drop 32-bit Xen PV support? And make 32-bit huge pages depend on >> PAE? Then 32-bit non-PAE can use the direct-mapped LDT, 32-bit PTI >> (and optionally PAE non-PTI) can use the evil virtually mapped LDT. >> And 32-bit non-PAE (the 2-level case) will only have pointers to page >> tables at the top level. And then we can preallocate. >=20 > Not sure I can follow you here. How can 32-bit PTI with PAE use the LDT > from the direct mapping? I am guessing you want to get rid of the > SHARED_KERNEL_PMD=3D=3D0 case for PAE kernels. I wrote nonsense. I mean bite off a piece of the *user* portion of the addre= ss space and stick the LDT there. I contemplated doing this when I wrote the 64-bit code, but I decided we had= so much address space to throw around that I liked my solution better. > This would indeed make > syncing unneccessary on PAE, but pre-allocation would still be needed > for 2-level paging. Just the amount of memory needed for the > pre-allocated PTE pages is half as big as it would be with PAE. >=20 >> Or maybe we don't want to defeature this much, or maybe the memory hit >> from this preallocation will hurt little 2-level 32-bit systems too >> much. >=20 > It will certainly make Linux less likely to boot on low-memory x86-32 > systems, whoever will be affected by this. >=20 >=20 I=E2=80=99m guessing the right solution is either your series or your series= plus preallocation on 64-bit. I=E2=80=99m just grumpy about it...=