Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2115582ybk; Mon, 11 May 2020 12:17:04 -0700 (PDT) X-Google-Smtp-Source: APiQypIefLgGaQSb4xtakNK3o1hP5GYsYPWC+5AusCi2OL6784Lwo7vPdEVcIjarNhUw32R8ufKl X-Received: by 2002:a05:6402:22cd:: with SMTP id dm13mr15267300edb.56.1589224624395; Mon, 11 May 2020 12:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589224624; cv=none; d=google.com; s=arc-20160816; b=Lg5EwJa8KA5dNV4+hPGqRi7DbX1Kvem9ievpzT8YePs+5dgebhdAp5s9g/w5Rxm/Ci FtNgIZ+lAQqcGLpwbe/PNO443FVc+21QSGbaiZyaj1a1aFpIGCqgdS01nOkZt1w+i7L4 YIiLTw6BuiTBVoijUVUxD8PhOAkthOtTu+jc+S1waDSL5zTjSIFuruNQjdrG3eHnsZp9 UBGz5TGyROKlL5ef5hgKywH/SByaHFiAV9vQpde1/Ikk9GWcjPwhoRvYhniA4j6SLJRG c2Ywj9IQQDt64ZzK01HILJq55wwFNwRPgjqniLP7PW3bE2R/IUKQsGfNbJPFDZf3Y384 I7jw== 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; bh=N4Iq/uRhQ7w3T4RPs9i9enk2bEF8umiTf+ePYj+4bvU=; b=vUOJBG7J6IDYrPb2XePQvDmMqTJoNDSHZzl4bMGQoN+mQjrNPjEZLdVYEMvnTqRgu8 sOmpxtk/Nb7ayIBB7XJKvoXsUe4h3f1A+wIbsbsAnlFKClYuJNF0ZUXqnpevAjeXr69a tnUgDIn6wmoXLaFZaRyBLNicxLjDRhUDEcdoQEPe8qGDoGl2tDRr6yBaeGiJwGaMm4BS pdUpRrv+siafcR7UE0uQHlAXMOpaTCYxFdbjDScu/9gay4DZD9fSajMcjSdyfoY7SIKd j7RMUmfBV0Kx9HizpQNyvmxmfmTm8Rl8Ah+dnPlY6qoiwIuWgBM2NeidBK7HM/dqznNf VKsw== ARC-Authentication-Results: i=1; mx.google.com; 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 f16si6283679edr.583.2020.05.11.12.16.41; Mon, 11 May 2020 12:17:04 -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; 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 S1731340AbgEKTOU (ORCPT + 99 others); Mon, 11 May 2020 15:14:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:35708 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728613AbgEKTOU (ORCPT ); Mon, 11 May 2020 15:14:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0909DAF6F; Mon, 11 May 2020 19:14:21 +0000 (UTC) Date: Mon, 11 May 2020 21:14:14 +0200 From: Joerg Roedel To: Andy Lutomirski Cc: 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 Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() Message-ID: <20200511191414.GY8135@suse.de> References: <20200508144043.13893-1-joro@8bytes.org> <20200508213609.GU8135@suse.de> <20200509175217.GV8135@suse.de> <20200511074243.GE2957@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 08:36:31AM -0700, Andy Lutomirski wrote: > What if we make 32-bit PTI depend on PAE? 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. > 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. 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==0 case for PAE kernels. 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. > 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. It will certainly make Linux less likely to boot on low-memory x86-32 systems, whoever will be affected by this. Joerg