Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2616894pxk; Sun, 20 Sep 2020 10:26:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznK95eWl/EVK7Mt09jlsbmGU+QQxs903d6+giqzU0ZVq5nz+2U2KEQ2PvK+gqZT3UWQQ7W X-Received: by 2002:aa7:d750:: with SMTP id a16mr49848064eds.362.1600622805843; Sun, 20 Sep 2020 10:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600622805; cv=none; d=google.com; s=arc-20160816; b=ncI1FTi4sXcfohjsPXbovT18kAROMeCF0S4C3FgrxMDMOYZzyrur0x2k3cbpms21xP BxPO5cDv0dugyLAzALSDXNYpRWNRx+1WsD4OlPRBabetaYbiLsu65pdzzjSGl0N5e69t BtcCOQusZFV+pzsKgg2DBZ8kTKg+b8KK7B4DYcKLqcC/fwDVspETvlbMvEjeriXmQkjz w4ZQXWWGiP0akuOLkkSGQRTD3IdGckWtBjglJ0dRxUWcbcjxtBu4H+D18F5rAnO/ovKM IGMK3KqUOyeBAoLVQQCHrp9FuppnPIT6xSQ7+qiz4eCTI4WnXnvBjtmraVR5DQylUb4A xPIw== 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=ELUNMLCQYXoHQWzGjHTiBi/GvrgBrzUdsStDgdETjPA=; b=CpAS7Qmx3b4pRmPK8PIE306WIV3NdTG9bK4X2dHnquVui4ymJWcjY0U6nGh6uXxnnT ehM6cIo7mXaMgbWSG3gsQMBFI1r37UOUfoOZUCyJW3GsCDwfA5WqlCVZ7pVWF/xli890 +YfAxR1mCXfnbf0dAMSz0sDRK44VsdKXQaHU1dHvyARgO8iya4e8K7MdmMcdgJrP6I46 sa9/leEQ7r27YxSsYHP7l0ol/yzNu4P/6wyZtniV5sS3VzI0bwUInIKP2kMsEDNdXZRj XktAWrChSeAFZugxeZfBF5tBs0Yyta0qCfQ1He/6fAQzfydBnuvQM8TU04XiaircEgiS FKFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tzqY9X8f; 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 j24si6790433ejd.671.2020.09.20.10.26.08; Sun, 20 Sep 2020 10:26:45 -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=tzqY9X8f; 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 S1726135AbgITRYx (ORCPT + 99 others); Sun, 20 Sep 2020 13:24:53 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:46734 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbgITRYx (ORCPT ); Sun, 20 Sep 2020 13:24:53 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1600622689; 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=ELUNMLCQYXoHQWzGjHTiBi/GvrgBrzUdsStDgdETjPA=; b=tzqY9X8fLvmtivfsbNK0pUu8YiUj7NKf7+bQzIN33nK/SwghNMa2rz52k7m9LEaGnDxB4p 5uJRP8jzSGhdLLpPzoF07YS1dppzeAHFuaRXBxkQ6eQFewoBrpPutv3yBGdR9YKqd5UnMc Lfw64Wh81l4jTzfijbUVM/G1PeB+l9wpVjsRPd3Xz3aQUHw9+Bu78ZLn5k1aNaH9Pkc5ms Lg9Dct8esi3AxOTl0URAWW4pIL6LMaz6yDqISWtV082sZby+eUJYHhPHZSuxMGdcllbxYl qQ/7nvxbGePtOn6SDA8Bi+zAxXBj+TvBWAwr7ALWt4wsGLJLJU/NhQ4k2+3KDg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1600622689; 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=ELUNMLCQYXoHQWzGjHTiBi/GvrgBrzUdsStDgdETjPA=; b=Ajg419VRwVNBaCnESvnWBGYX1dQ8DDFprO3wwe5+UvEno+/XgboH3A5bxhtY6hr785JAXL VPGuKWoChMzzg9BQ== To: Daniel Vetter Cc: Daniel Vetter , LKML , "open list\:GENERIC INCLUDE\/A..." , Linus Torvalds , Paul McKenney , X86 ML , Sebastian Andrzej Siewior , Peter Zijlstra , 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 , intel-gfx , dri-devel , Ard Biesheuvel , Herbert Xu , Vineet Gupta , arcml , 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" , sparclinux@vger.kernel.org Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends In-Reply-To: <20200920082353.GG438822@phenom.ffwll.local> References: <20200919091751.011116649@linutronix.de> <87pn6hc6g1.fsf@nanos.tec.linutronix.de> <20200920082353.GG438822@phenom.ffwll.local> Date: Sun, 20 Sep 2020 19:24:49 +0200 Message-ID: <87h7rscqe6.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 Sun, Sep 20 2020 at 10:23, Daniel Vetter wrote: > On Sun, Sep 20, 2020 at 08:23:26AM +0200, Thomas Gleixner wrote: >> On Sat, Sep 19 2020 at 12:37, Daniel Vetter wrote: >> > On Sat, Sep 19, 2020 at 12:35 PM Daniel Vetter wrote: >> >> I think it should be the case, but I want to double check: Will >> >> copy_*_user be allowed within a kmap_temporary section? This would >> >> allow us to ditch an absolute pile of slowpaths. >> > >> > (coffee just kicked in) copy_*_user is ofc allowed, but if you hit a >> > page fault you get a short read/write. This looks like it would remove >> > the need to handle these in a slowpath, since page faults can now be >> > served in this new kmap_temporary sections. But this sounds too good >> > to be true, so I'm wondering what I'm missing. >> >> In principle we could allow pagefaults, but not with the currently >> proposed interface which can be called from any context. Obviously if >> called from atomic context it can't handle user page faults. > > Yeah that's clear, but does the implemention need to disable pagefaults > unconditionally? As I wrote in the other reply it's not required and the final interface will neither disable preemption nor pagefaults (except for the atomic wrapper around it). Thanks, tglx