Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp369947pxk; Wed, 23 Sep 2020 05:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+qrt5GZOXs0TOprZsQDyRIMiC9UUhoPAOzgRF96bboGfipjGYEseU7XFJE9vhSekoJz7X X-Received: by 2002:a05:6402:1656:: with SMTP id s22mr9929070edx.160.1600864611505; Wed, 23 Sep 2020 05:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600864611; cv=none; d=google.com; s=arc-20160816; b=0FOifXIiINq9MPxPs8lprZJeBED2KDiqUfr798FUE1LFsK4qcqYAFfwTZ8TfIvLBZM R+xVMnC4Cq/QYZibzrdgWOYqN7NnSKyFJsFk+bU2nra5Z7ELm/PthGF4ARF6A+o5VvT0 uY1FOXHZKefgJX4VY3DXc9d/4AkFK0SDAdoNYw6gLaB8otlDfAxE2q1eOEopz/I3liAc vRkb32FnY5YIAnLlwrJcyE6O1qfef3urr7N76+QZ7XM/YWI4R6h9IU8L4hy9jMpf0Eba yfvMYD+pdFhPeAZvnk0gMcjVwcpxzDeHZrcYbBR0Gu9/cM3k4tsAS8XvhzjdZDbY/318 J85w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=4zUEMW9wU+kwouVfGxKhtf6Di/IFhmYOqDGQKAREV8o=; b=IjrpmQXQlV7tZJYBiGmLkEz0RtpzdWEXE68ELkXwn6QrmzFStt2/M7PHH8HbqSEIn2 VaU95foWdLr+z3eoabCnUgv/L3HyJy0tnLtFVcQTSL7C8uS0FGaeQNsvs41lzdB+elgQ 7C/mksAnCCACaAkEd/U9WAAVgJ/Y3wZIHljsjurm8dtbjtRq2afAbsTO9T2Kh2tOFFPr rMRRwqqAC6FXIWjW7EHbib8M6BiK8OPcaGuAMwbJP6i2pRe0PH7xsx6vSQQYMWP6BCPy bFJ0VpcdiD79tyYs9yrZnJy2PNDWTIhf+ledvCoBX9r5MuuFgpVxK4VJNM7e22Z0qXrv 0r9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=mQ42gd2D; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si13265655edr.538.2020.09.23.05.36.27; Wed, 23 Sep 2020 05:36:51 -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=@linutronix.de header.s=2020 header.b=mQ42gd2D; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbgIWMdW (ORCPT + 99 others); Wed, 23 Sep 2020 08:33:22 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:37306 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbgIWMdV (ORCPT ); Wed, 23 Sep 2020 08:33:21 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1600864398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4zUEMW9wU+kwouVfGxKhtf6Di/IFhmYOqDGQKAREV8o=; b=mQ42gd2DhQ/RG0jBtJb4meJN+5wV2pj9iVLxHpupYAkadW+bY5A7tLe5ML2OCxkUDyFcOz 1ID+60xXG2OjXRxOxnGUclm3zYFaTcjPF9ahEeidyum940F7pRvQQ+6fARlpRL8arWBYw5 sXQ3YFT0QLJJsnhzzhPX5pkUAQdcb0r75msvmD5rVzIQdvYOpaNOYhzVgXEW9+SvrTpZ5S VYlZevpT0pbNGk2c2vrUKV2OAsLRNBNh2/g0YkvfbfbDyed7rHhHQWMZYKtR79LU83j38G 5r/WEDgX3y9hgl7i7P9JlU2XJG/6OaMoTDqwD5QZO9LvlKLV3P7ptN62EV3bIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1600864398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4zUEMW9wU+kwouVfGxKhtf6Di/IFhmYOqDGQKAREV8o=; b=ohpCeECCtFRlt7dpUmuCjEyhCy6FZxCGdV74xdJ5JgvLxUGaba5R+t2Tfw4DYzdeiW9o4A 74IrdXtsMBTtycCw== To: peterz@infradead.org Cc: Linus Torvalds , LKML , linux-arch , Paul McKenney , the arch/x86 maintainers , Sebastian Andrzej Siewior , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Will Deacon , Andrew Morton , Linux-MM , Russell King , Linux ARM , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx , dri-devel , Ard Biesheuvel , Herbert Xu , Vineet Gupta , "open list\:SYNOPSYS ARC ARCHITECTURE" , Arnd Bergmann , Guo Ren , linux-csky@vger.kernel.org, Michal Simek , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Nick Hu , Greentime Hu , Vincent Chen , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev , "David S. Miller" , linux-sparc Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends In-Reply-To: <20200923101953.GT2674@hirez.programming.kicks-ass.net> References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> <87sgbbaq0y.fsf@nanos.tec.linutronix.de> <20200923101953.GT2674@hirez.programming.kicks-ass.net> Date: Wed, 23 Sep 2020 14:33:17 +0200 Message-ID: <87sgb8ad0y.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23 2020 at 12:19, peterz wrote: > On Mon, Sep 21, 2020 at 09:27:57PM +0200, Thomas Gleixner wrote: >> Alternatively this could of course be solved with per CPU page tables >> which will come around some day anyway I fear. > > Previously (with PTI) we looked at making the entire kernel map per-CPU, > and that takes a 2K copy on switch_mm() (or more general, the user part > of whatever the top level directory is for architectures that have a > shared kernel/user page-table setup in the first place). > > The idea was having a fixed per-cpu kernel page-table, share a bunch of > (kernel) page-tables between all CPUs and then copy in the user part on > switch. > > I've forgotten what the plan was for ASID/PCID in that scheme. > > For x86_64 we've been fearing the performance of that 2k copy, but I > don't think we've ever actually bit the bullet and implemented it to see > how bad it really is. I actually did at some point and depending on the workload the overhead was clearly measurable. And yes, it fell apart with PCID and I could not come up with a scheme for it which did not suck horribly. So I burried the patches in the poison cabinet. Aside of that, we'd need to implement that for a eight other architectures as well... Thanks, tglx