Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Paul E. McKenney
On Thu, Aug 29, 2013 at 09:57:35PM +0800, Libin wrote: > 1)Problem Description: > The prototype of invalid wakeup problem is as follows: > > > Consumer Thread > > ... >

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
Hi all, I'm so sorry, please ignore this patch set! I have realized that there is no this problem in our kernel. Preempt_schedule() has set PREEMPT_ACTIVE before calling __schedule() and __schedule will check it if current state is not TASK_RUNNING, avoiding this preemption. Libin On 2013/8/29 21

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Tejun Heo
Hello, again. On Thu, Aug 29, 2013 at 10:08:13PM +0800, Libin wrote: ... > static void simulate_preempted(void) > { > schedule(); > } Gees... of course, your test code will stall. Preemption != schedule(). Please take a look at PREEMPT_ACTIVE handling in __schedule(). Thanks. -- tejun

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
On 2013/8/29 21:57, Libin wrote: > 2)Test: > I have written a test module to trigger the problem by adding some > synchronization condition. I will post it in the form of an attachment soon. > > Test result as follows: > [103135.332683] wakeup_test: create two kernel threads - producer & cons

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Tejun Heo
Hello, Libin. I'm completely confused by this series On Thu, Aug 29, 2013 at 09:57:35PM +0800, Libin wrote: > 1)Problem Description: > The prototype of invalid wakeup problem is as follows: > > --

[PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
1)Problem Description: The prototype of invalid wakeup problem is as follows: Consumer Thread ... if (list_empty(&list)){ //location a set_current_stat