Re: [PATCH] kthread: Enhance kthread_stop to abort interruptible sleeps

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oleg Nesterov
Date: Tuesday, April 24, 2007 - 1:27 pm

On 04/24, Eric W. Biederman wrote:

I guess you will re-submit these patches soon. May I suggest you to put
this


and this


into the separate patch?

Perhaps I am too paranoid, and most probably this change is good, but
still I'm afraid this very subtle change may break things. In that case
it would be easy to revert that only part (for example for the testing
purposes).

Consider,

	current->flags |= PF_NOFREEZE;

	while (!kthread_should_stop()) {

		begin_something();

		// I am a kernel thread, all signals are ignored.
		// I don't want to contribute to loadavg, so I am
		// waiting for the absoulutely critical event in
		// TASK__INTERRUPTIBLE state.

		if (wait_event_interruptible(condition))
			panic("Impossible!");

		commit_something();
	}

Oleg.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] make kthread_stop() scalable, Oleg Nesterov, (Fri Apr 13, 6:02 am)
Re: [PATCH 3/3] make kthread_stop() scalable, Eric W. Biederman, (Fri Apr 13, 4:44 pm)
[PATCH] kthread: Enhance kthread_stop to abort interruptib ..., Eric W. Biederman, (Fri Apr 13, 8:13 pm)
[PATCH] kthread: Simplify kthread_create., Eric W. Biederman, (Fri Apr 13, 8:17 pm)
Re: [PATCH 3/3] make kthread_stop() scalable, Oleg Nesterov, (Sat Apr 14, 11:02 am)
Re: [PATCH 3/3] make kthread_stop() scalable, Eric W. Biederman, (Sat Apr 14, 11:34 am)
Re: [PATCH 3/3] make kthread_stop() scalable, Oleg Nesterov, (Sat Apr 14, 11:50 am)
Re: [PATCH] kthread: Enhance kthread_stop to abort interru ..., Eric W. Biederman, (Sat Apr 14, 12:04 pm)
Re: [PATCH] kthread: Enhance kthread_stop to abort interru ..., Eric W. Biederman, (Tue Apr 24, 3:30 am)
Re: [PATCH] kthread: Enhance kthread_stop to abort interru ..., Eric W. Biederman, (Tue Apr 24, 4:11 am)
Re: [PATCH] kthread: Enhance kthread_stop to abort interru ..., Eric W. Biederman, (Tue Apr 24, 10:18 am)
Re: [PATCH] kthread: Enhance kthread_stop to abort interru ..., Oleg Nesterov, (Tue Apr 24, 1:27 pm)
Re: [PATCH] kthread: Enhance kthread_stop to abort interru ..., Eric W. Biederman, (Tue Apr 24, 2:19 pm)