[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 3/4] utrace_reap: do not play with lock/unlock/restart

(Note I'm replying to 3/4 before 2/4.)

> IOW, nobody change change engine->ops or REAP bit in flags. Nobody can
> add the new engine or remove it from ->attached. We can do all work
> lockless and without barriers.

Makes sense.  In commit ac6e19c the body looks like this:
	struct utrace_engine *engine, *next;



	 * Since we were called with @utrace->reap set, nobody can
	 * set/clear UTRACE_EVENT(REAP) in @engine->flags or change
	 * @engine->ops, and nobody can change @utrace->attached.

	list_for_each_entry_safe(engine, next, &utrace->attached, entry) {
		if (engine->flags & UTRACE_EVENT(REAP))
			engine->ops->report_reap(engine, target);

		engine->ops = NULL;
		engine->flags = 0;


> Note that I changed the logic a bit, we set ->ops = NULL after
> ->report_reap(). Is it OK? If not, it is trivial to change.

I believe this only affects utrace_barrier.  See the next reply about that.
Can you think of another effect?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]