tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: percpu_foreach() does not execute remotely




> On Jan 28, 2020, at 8:37 PM, Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
> 
> The reason percpu_foreach takes percpu_swap_lock is so that the
> pointer percpu_getptr_remote returns remains stable _without_
> percpu_getref/putref.

What happens if:

	oink = percpu_getref(...);
	...
	mutex_enter(...);	// blocks for a long time for whatever reason.
	// while we're blocked, someone else does a percpu_alloc() that results
	// in percpu_cpu_enlarge()?
	// Isn't "oink" invalid now?
	...
	percpu_putref(...);

-- thorpej



Home | Main Index | Thread Index | Old Index