From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752764AbdGYQd5 (ORCPT ); Tue, 25 Jul 2017 12:33:57 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38072 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300AbdGYQd4 (ORCPT ); Tue, 25 Jul 2017 12:33:56 -0400 Date: Tue, 25 Jul 2017 18:33:18 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com Subject: Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option Message-ID: <20170725163318.bporqvcoodtel4a6@hirez.programming.kicks-ass.net> References: <20170724215758.GA12075@linux.vnet.ibm.com> <1500933497-12612-4-git-send-email-paulmck@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500933497-12612-4-git-send-email-paulmck@linux.vnet.ibm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 24, 2017 at 02:58:16PM -0700, Paul E. McKenney wrote: > The sys_membarrier() system call has proven too slow for some use > cases, which has prompted users to instead rely on TLB shootdown. > Although TLB shootdown is much faster, it has the slight disadvantage > of not working at all on arm and arm64. This commit therefore adds > an expedited option to the sys_membarrier() system call. > @@ -64,6 +65,10 @@ SYSCALL_DEFINE2(membarrier, int, cmd, int, flags) > if (num_online_cpus() > 1) > synchronize_sched(); > return 0; > + case MEMBARRIER_CMD_SHARED_EXPEDITED: > + if (num_online_cpus() > 1) > + synchronize_sched_expedited(); > + return 0; So you now give unprivileged userspace the means to IPI the entire machine? So what do we do when someone goes and does: for (;;) sys_membarrier(MEMBARRIER_CMD_SHARED_EXPEDITED, 0); on us?