Re: [PATCH v3 22/22] thermal/intel_powerclamp: Convert the kthread to kthread worker API
From: Jacob Pan <hidden>
Date: 2016-01-12 02:20:23
Also in:
linux-mm, linux-pm, lkml
From: Jacob Pan <hidden>
Date: 2016-01-12 02:20:23
Also in:
linux-mm, linux-pm, lkml
On Fri, 8 Jan 2016 17:49:31 +0100 Petr Mladek [off-list ref] wrote:
Is the __preempt_schedule() a problem? It allows to switch the process when needed. I thought that it was safe because try_to_freeze() might have slept as well.
not a problem. i originally thought queue_kthread_work() may add delay but it doesn't since there is no other work on this kthread.
quoted
- vulnerable to future changes of queuing workThe question is if it is safe to sleep, freeze, or even migrate the system between the works. It looks like because of the try_to_freeze() and schedule_interrupt() calls in the original code. BTW: I wonder if the original code correctly handle freezing after the schedule_timeout(). It does not call try_to_freeze() there and the forced idle states might block freezing. I think that the small overhead of kthread works is worth solving such bugs. It makes it easier to maintain these sleeping states.
it is in a while loop, so try_to_freeze() gets called. Am I missing something? Thanks, Jacob -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>