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 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A7CBC48BE6 for ; Wed, 16 Jun 2021 10:20:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD86461351 for ; Wed, 16 Jun 2021 10:20:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD86461351 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7250D6B006E; Wed, 16 Jun 2021 06:20:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 70E066B0070; Wed, 16 Jun 2021 06:20:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C37B6B0071; Wed, 16 Jun 2021 06:20:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0048.hostedemail.com [216.40.44.48]) by kanga.kvack.org (Postfix) with ESMTP id 2C88B6B006E for ; Wed, 16 Jun 2021 06:20:47 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C3F3E8249980 for ; Wed, 16 Jun 2021 10:20:46 +0000 (UTC) X-FDA: 78259193292.36.4698DFE Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 7E8ECE000262 for ; Wed, 16 Jun 2021 10:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cy5WDEDJoCifDNXZBFXkP+HYSey95Q3SWFI+OtZhevA=; b=LdAxykxUBy1mTWLpEJKa13we03 phPq39iI1GERziQK6xOwMuLoG1DH7H3Ih2PMfYggHNzEPZJPIwoOkvkfTha/Flb7re2IsVq/n/wQU WQBTOw+RBSBHUcQrKC2Wzy/SQ2W4SHZMnyv+n1GJ2Mzpg/BHPpzrsVH5JiG4mwy5pmkivmM9S3D0t q2SIvpSb19H35LDLpBbxgf8JdKsPW1+cx9wA86blx2p3I/hnyAHGoNjr6xxTuX7GSI9VjdeLQiw2W dz6nobQ5wc+pBHgdJG5aCTkF5y2/ArxAU+Lu4ZBwAZdmLG6YcC0FtPUV0nLf7KCwj9nk0Nr8T9EaK fa/d+2eQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltSeU-007u7x-Pt; Wed, 16 Jun 2021 10:20:08 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 6B544300269; Wed, 16 Jun 2021 12:20:06 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5263420C169EA; Wed, 16 Jun 2021 12:20:06 +0200 (CEST) Date: Wed, 16 Jun 2021 12:20:06 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: x86@kernel.org, Dave Hansen , LKML , linux-mm@kvack.org, Andrew Morton , Mathieu Desnoyers , Nicholas Piggin , Russell King , linux-arm-kernel@lists.infradead.org, Will Deacon Subject: Re: [PATCH 7/8] membarrier: Remove arm (32) support for SYNC_CORE Message-ID: References: <2142129092ff9aa00e600c42a26c4015b7f5ceec.1623813516.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=LdAxykxU; dmarc=none; spf=none (imf30.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org X-Rspamd-Server: rspam02 X-Stat-Signature: 1m88a9u5ihikc4hhtt6yzjqmfck9tcp6 X-Rspamd-Queue-Id: 7E8ECE000262 X-HE-Tag: 1623838839-457856 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: On Wed, Jun 16, 2021 at 12:16:27PM +0200, Peter Zijlstra wrote: > On Tue, Jun 15, 2021 at 08:21:12PM -0700, Andy Lutomirski wrote: > > On arm32, the only way to safely flush icache from usermode is to call > > cacheflush(2). This also handles any required pipeline flushes, so > > membarrier's SYNC_CORE feature is useless on arm. Remove it. > > So SYNC_CORE is there to help an architecture that needs to do something > per CPU. If I$ invalidation is broadcast and I$ invalidation also > triggers the flush of any uarch caches derived from it (if there are > any). Incomplete sentence there: + then we don't need SYNC_CORE. > Now arm_syscall() NR(cacheflush) seems to do flush_icache_user_range(), > which, if I read things right, end up in arch/arm/mm/*.S, but that > doesn't consider cache_ops_need_broadcast(). > > Will suggests that perhaps ARM 11MPCore might need this due to their I$ > flush maybe not being broadcast