From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80138E7716A for ; Sat, 14 Dec 2024 22:11:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E4086B007B; Sat, 14 Dec 2024 17:11:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 96D1A6B0083; Sat, 14 Dec 2024 17:11:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 80E676B0085; Sat, 14 Dec 2024 17:11:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5FBE06B007B for ; Sat, 14 Dec 2024 17:11:21 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id BB223C0546 for ; Sat, 14 Dec 2024 22:11:20 +0000 (UTC) X-FDA: 82894960260.01.1601197 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id E9076C0009 for ; Sat, 14 Dec 2024 22:10:47 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=FPP5zK8V; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734214258; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Qo9DRUyKRrqtLyRuNXYM99TkYAh0n7GpnTKVcYgBdPE=; b=2EHtDSgrOglLGrDDdeVPA8Ju4+2Gmn1RfpoFZLuekptEAEt++zOQRi3NyNFJSlHyezFl2L byiKOeNZjjLynubWby1pliirMHIpFd/zu8yKS15eSeUxDm0vnnkUZz9GbLyNd95i9k+lU3 30aclHzxoOLsi+H+On1DB8CcNLDx88c= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=FPP5zK8V; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734214258; a=rsa-sha256; cv=none; b=Jj9hX3gYJRbr5uN4L5Sz5f33xQpbHMQVeRi+spVekhO73xgRj6qKw+OdEBzYrLpn2qvFOs tZc7DPiMhDIEVA81gi6b+JbojlLelSlbGSwOQLl01AXkis+2Iu6Y0EieIK1GDI8873NCLt zYj+b9bp6XnkniWiLGUag/amvs2A+20= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Qo9DRUyKRrqtLyRuNXYM99TkYAh0n7GpnTKVcYgBdPE=; b=FPP5zK8ViSCb+8pbD6ArAAmyiH 5tbsuw6oSYj65D4t5veoY7adMhxKFB+WgfTWDVJO6RSojy1lEUw9xUz8L8QRlbtz5dnQSi5XxMcdt 6Ff8bEnof3eNQ9CAbrH+Yb0z23MJSpEmAMZe4iU6on3G7ZyYYSTWWEcP5qzywn7bC/HXl2oduQes/ RqBpxyXKcYfPIe3zo1ZYsTnleFm0OLJfvW7SzyxVyFsRaKN4mrB7K3332MojFURnVQ4FVivEMLjjR OEvWiSHUz4gM4MSrYfTBe+OWUyE0rlNy/yBYHKTJYbdUJEu38qV2Sfqjgz8BdUoHPhaN36eG3EKuj /1Tq73AQ==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tMaLs-00000005RuX-0hl1; Sat, 14 Dec 2024 22:11:08 +0000 Date: Sat, 14 Dec 2024 22:11:07 +0000 From: Matthew Wilcox To: "Russell King (Oracle)" Cc: Linus Walleij , Sebastian Andrzej Siewior , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , linux-mm@kvack.org, linux-rt-devel@lists.linux.dev, Ard Biesheuvel , Clark Williams , Jason Baron , Josh Poimboeuf , Mark Rutland , Peter Zijlstra , Steven Rostedt , David Hildenbrand Subject: Re: [PATCH 2/4] ARM: Disable HIGHPTE on PREEMPT_RT kernels Message-ID: References: <20241210160556.2341497-1-arnd@kernel.org> <20241210160556.2341497-3-arnd@kernel.org> <20241211152257.Igx3aT2Y@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: E9076C0009 X-Rspamd-Server: rspam12 X-Stat-Signature: r4x6ih75zqscg93y483711dq9w1zhh93 X-Rspam-User: X-HE-Tag: 1734214247-268157 X-HE-Meta: U2FsdGVkX18iD4pvhh4ZdL6KInGXQXmjY6g40qum66/NMWYTQRYHackd8mhLqxXyInkPKEo9pztBBlWjyqY9a2/fRcyXUaMfOEttQZsPau0NUNJOWC+wepBAZb/I0/Q4sDs7YTLd2FjSSQHmJKsDhod81j3vi8gZA6EIXL+oQFyb++uYVycGzl9p6ES3vbCuVIaSQkZzJsojL6L/wheBWHAgBYPOeywtNdd2/6uDjfLradvpoytb6cYcRYpy3qHjHMy4V0GqtHEVsW4zy8eFXMvbMYvfPj/FDSZU51q20p9yV6dDa1HmkJhgHDu9A4tks9iXd6UgjFnctYTlTYvj92Mi0ztmlaUkCYqrZBNP0Z0HQJfRoQXCrao6kTHIR0FufbbsB41jZDrh7CAtTWxHPfae2tpWRy3YEvFiLu1To/u+RkZ+khCeBY+2siW3BPnoTeaIWzVwuJdOzQB9vzQbVuAeh+gt3eotPE3+PC5c3GyQibEeyjqjHACIQeNQCSQ2kDrXtPuxLl2O9o1t1qo9DcZaj7An68BPn3h8EMe7qhbgiXONE6/GEnsnRlkt1xQFg6oNGN+P0tDvzpu5lwGumPCWTL7Ycb562HtJEbpfaZt9b+eYNdzQF1oYfX4+3gypRGurwey0oW8AZ0gtplRvL9wndyCtywfqKU5hBoWIJWR1DQ+gXCNCvgOoJzY1Wv/gCOuyoQnXoFEGBnKumSERldOSb41Liq/H85XYehdtfFvuzzbDWP2ctQtVv1Em4RKckgqlaPDlnfZZv5CWuaC2tljma4KvWVewWKgzG5piCo7+jN6FDay9U8ONxMEmAacAmLNDlAsBnqLzuSHl020MCYX/Mm9jHizEKg6PAJZ8XDj6/QGARtu/UNG+WGQElw41anIlNYpmYgMUhGvj/V71/zjuBfEoVZbsTz0aGr2uw4PN04e3nQpKO27xpRBknT78+R5XfLXNsAW/sovRqh3 C2ymMtFo LCWxSxysfZ+euYyxQOLYEiohpIWiI3BjXrKAlZ9KszW++dE9CnOF0+4DnS3v2fiws6smi14JR+MEBM/AxtaTPcBzkyksHBlGs1ZCspHHloJbMVHyGzDPG+g8jVPHz0thYmg3TTeioAnUyNobKjvCwdsVC1a3KRkPfHpaFsdKgTWWMRVIq1halkDzUUXgzPKF+JHLxj5A2k/xYFNv39vhTxKrIs7b2AkkDewv3ngu7ewUxEEjy8gLyciN5bEBYxX5YNSEMYtQW0OW1ZhHbmDQcczdVe1/fZA9i66P1HrsImmWiGsc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Dec 13, 2024 at 09:11:57AM +0000, Russell King (Oracle) wrote: > On Fri, Dec 13, 2024 at 01:27:00AM +0100, Linus Walleij wrote: > > On Wed, Dec 11, 2024 at 4:22 PM Sebastian Andrzej Siewior > > wrote: > > > On 2024-12-11 14:29:29 [+0100], Linus Walleij wrote: > > > > So fast GUP is supposed to be lockless, and should just not > > > > have this problem. So it can't be addressing gup_fast_pgd_range() > > > > right? > > > … > > > > I'm more asking if HIGHPTE even acquires a spinlock anymore > > > > as it is supposed to be "fast"/lockless. If it does, it is clearly violating > > > > the "fast" promise of the fast GUP API and should not exist. > > > > > > This is lockless on x86. The problem is ARM's > > > arch_kmap_local_high_get(). This is where the lock is from. > > > > Aha that calls down to kmap_high_get() that that issues > > lock_kmap_any(flags). > > > > But is it really sound that the "fast" API does this? It feels > > like a violation of the whole design of the fast stuff. > > If there's no way to do it lockless, then it has to take the lock. Well, no, it's allowed to fail. It could trylock and fail if it can't get the lock.