Re: CFS and suspend2: hang in atomic copy

Bob Picco
2007-04-19T11:10:32Z

Ingo Molnar wrote: [Thu Apr 19 2007, 02:29:36AM EDT]
>
> * Bob Picco <bob.picco@hp.com> wrote:
>
> > I had hoped to collect more data with CFS V2. It crashes in
> > scale_nice_down for s2ram when attempting to disable_nonboot_cpus. So
> > part of traceback looks like (typed by hand with obvious omissions):
> >
> > scale_nice_down
> > update_stats_wait_end - not shown in traceback because inlined
> > pick_next_task_fair
> > migration_call
> > task_rq_lock
> > notifier_call_chain
> > _cpu_down
> > disable_nonboot_cpus
>
> ok, this looks similar to the jpeg Christian did. Does the patch below
> fix the crash for you?
>
> Ingo
>
> ---
> kernel/sched.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Index: linux/kernel/sched.c
> ===================================================================
> --- linux.orig/kernel/sched.c
> +++ linux/kernel/sched.c
> @@ -4425,6 +4425,8 @@ static void migrate_dead_tasks(unsigned
> struct task_struct *next;
>
> for (;;) {
> + if (!rq->nr_running)
> + break;
> next = pick_next_task(rq, rq->curr);
> if (!next)
> break;
This patch repairs s2ram issue.

Thanks.

bob