|
|
Log in / Subscribe / Register

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

From:  Peter Zijlstra <peterz-AT-infradead.org>
To:  "Paul E. McKenney" <paulmck-AT-linux.vnet.ibm.com>
Subject:  Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option
Date:  Tue, 25 Jul 2017 18:33:18 +0200
Message-ID:  <20170725163318.bporqvcoodtel4a6@hirez.programming.kicks-ass.net>
Cc:  linux-kernel-AT-vger.kernel.org, mingo-AT-kernel.org, jiangshanlai-AT-gmail.com, dipankar-AT-in.ibm.com, akpm-AT-linux-foundation.org, mathieu.desnoyers-AT-efficios.com, josh-AT-joshtriplett.org, tglx-AT-linutronix.de, rostedt-AT-goodmis.org, dhowells-AT-redhat.com, edumazet-AT-google.com, fweisbec-AT-gmail.com, oleg-AT-redhat.com

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?



to post comments


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds