Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option
From: Peter Zijlstra
Date: Tue Jul 25 2017 - 14:53:46 EST
On Tue, Jul 25, 2017 at 10:17:01AM -0700, Paul E. McKenney wrote:
> > munmap() TLB invalidate is limited to those CPUs that actually ran
> > threads of their process, while this is machine wide.
>
> Or those CPUs running threads of any process mapping the underlying file
> or whatever.
That doesn't sound right. munmap() of a shared file only invalidates
this process's map of it.
Swapping a file page otoh will indeed touch the union of cpumasks over
all processes mapping that page.
> And in either case, this can span the whole machine. Plus
> there are a number of other ways for users to do on-demand full-system
> IPIs, including any number of ways to wake up large numbers of CPUs,
> including from unrelated processes.
Which are those? I thought we significantly reduced those with the nohz
full work. Most IPI uses now first check if a CPU actually needs the IPI
before sending it IIRC.
> But I do plan to add another alternative that is limited to threads of
> the running process. I will be carrying both versions to enable those
> who have been bugging me about this to do testing.
Sending IPIs to mm_cpumask() might be better than expedited, but I'm
still hesitant. Just because people want it doesn't mean its a good
idea. We need to weight this against the potential for abuse.
People want userspace preempt disable, no matter how hard they want it,
they're not getting it because its a completely crap idea.