Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1968385ybk; Mon, 11 May 2020 08:39:10 -0700 (PDT) X-Google-Smtp-Source: APiQypJ6cNkpnnMSlI++Gbo1v1yk1CIQ9PyXEvcTOjiks9R+6pVgQEb8WdGPZrR4tI7P0Zypndwn X-Received: by 2002:a17:906:4111:: with SMTP id j17mr14357331ejk.242.1589211550109; Mon, 11 May 2020 08:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589211550; cv=none; d=google.com; s=arc-20160816; b=CmsumQHebhp3/jt5W+ruZlPAfkrivmDWM87LsmJqK/5IRiJymdixyI30TWWkjpdWak YDIuwq+/lsGvX0i+31l57LDCFN2YVeCJd0OKhM9XfEcU4Fxc3Al1zHGRxjHXoKW/o4D2 BiUFtO2JnDNcFEoge2EDm6AoBxH3CoiXjQBDGmDiohgsOa1A+rOUNlQA75tnH0z/nMsZ pdmBOaKhErhFhCXXFl//zrVNdNQ8VYcT1CCsSrFF6VNoGXHWUY+Cqfo13rPi0OlVMegw CGrm1n+OZwqOOJLcnbDM9sIYTJMVNvojyVQLy79bnE4XpJRkNLAYCIhd4T5cTSN1U7ZQ XwrQ== 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=ItAht6LVbbbUAJF4Wnn6yfIQw3gmVfy6RSjii5fg99s=; b=CcDGfW4i4j1XaGqPqQQPGmA3acuC1TpxsGyNCXVrn6oPBn/aG3OS7TasBzSZMysOx8 Y/IW3fk1bmLfhQWNl6FhdByDKR4eGXj4gd/k2X2VU8KC6XX1TqNjtcGjEI4k1oAsOEHt gGpKfDnXqp6zk5Vd6ROddWjMP0dqh/UdwdI71TbDfsXH0u0evG7nQtOGiOuHReojxauQ e69H4AX20CwgfLlH4eBxELSLIwA3Zsxz3TcB8w3lQVB5NjGDKF+A6aNfQrHInZD7CdLN fq8CUyheXeT4WpUQOpUhYkYtjPPbm+MBWcsr2Pn8IOkcRwX0UgXJo+xcM+gAneSfPsrG H8PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mand0Cvg; 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 i7si7157356edn.60.2020.05.11.08.38.44; Mon, 11 May 2020 08:39:10 -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=Mand0Cvg; 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 S1729573AbgEKPgr (ORCPT + 99 others); Mon, 11 May 2020 11:36:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729207AbgEKPgq (ORCPT ); Mon, 11 May 2020 11:36:46 -0400 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 33E36208CA for ; Mon, 11 May 2020 15:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589211405; bh=i3uY6cCArW5hN5wosQGib94nUFas1R+dCNb46rnxnio=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Mand0CvgonAGC5tTER+gjn+UohBoFWO9E+pZN3apVITUdnYCHVAmLp0NEc8uYh98N /wifwK92lqfAfP6sw9L+wWpbXDFB6mv8Syvn5eQhJ+R0OgZgYWIzompe9OVQMzydtM 049xxjdwYGxUSCTTO18sd3JPRPkRaF6J4hU4xSew= Received: by mail-wr1-f54.google.com with SMTP id l18so11521974wrn.6 for ; Mon, 11 May 2020 08:36:45 -0700 (PDT) X-Gm-Message-State: AGi0PuaosbqNB1HYU+ex4cwIqybTQ+9khZK7lO7JBpJXNcmNUMcEMgim OPODbFhrWpcP/1989BUx6fbsxg2fQUBUeUGiepp8nw== X-Received: by 2002:adf:a298:: with SMTP id s24mr9033222wra.184.1589211403564; Mon, 11 May 2020 08:36:43 -0700 (PDT) MIME-Version: 1.0 References: <20200508144043.13893-1-joro@8bytes.org> <20200508213609.GU8135@suse.de> <20200509175217.GV8135@suse.de> <20200511074243.GE2957@hirez.programming.kicks-ass.net> In-Reply-To: <20200511074243.GE2957@hirez.programming.kicks-ass.net> From: Andy Lutomirski Date: Mon, 11 May 2020 08:36:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() To: Peter Zijlstra Cc: Andy Lutomirski , Joerg Roedel , 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 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 Mon, May 11, 2020 at 12:42 AM Peter Zijlstra wrote: > > On Sat, May 09, 2020 at 12:05:29PM -0700, Andy Lutomirski wrote: > > > On x86_64, the only real advantage is that the handful of corner cases > > that make vmalloc faults unpleasant (mostly relating to vmap stacks) > > go away. On x86_32, a bunch of mind-bending stuff (everything your > > series deletes but also almost everything your series *adds*) goes > > away. There may be a genuine tiny performance hit on 2-level systems > > due to the loss of huge pages in vmalloc space, but I'm not sure I > > care or that we use them anyway on these systems. And PeterZ can stop > > even thinking about RCU. > > > > Am I making sense? > > I think it'll work for x86_64 and that is really all I care about :-) Sadly, I think that Joerg has convinced my that this doesn't really work for 32-bit unless we rework the LDT code or drop support for something that we might not want to drop support for. So, last try -- maybe we can start defeaturing 32-bit: What if we make 32-bit PTI depend on 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. 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. (Xen 32-bit PV support seems to be on its way out upstream.)