From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andrea Arcangeli <andrea@suse.de>,
linux-kernel@vger.kernel.org, jack@suse.cz,
Ingo Molnar <mingo@elte.hu>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: /proc dcache deadlock in do_exit
Date: Wed, 28 Nov 2007 19:30:34 +0300 [thread overview]
Message-ID: <20071128163034.GA144@tv-sign.ru> (raw)
In-Reply-To: <m1zlwzgn6h.fsf@ebiederm.dsl.xmission.com>
On 11/27, Eric W. Biederman wrote:
>
> Andrew Morton <akpm@linux-foundation.org> writes:
>
> > On Tue, 27 Nov 2007 14:20:22 +0100
> > Andrea Arcangeli <andrea@suse.de> wrote:
> >
> >> do_exit->release_task->mark_inode_dirty_sync->schedule() (will never
> >> come back to run journal_stop)
> >
> > I don't see why the schedule() will not return? Because the task has
> > PF_EXITING set? Doesn't TASK_DEAD do that?
>
> Yes, why do we not come back from schedule?
>
> If we are not allowed to schedule after setting PF_EXITING before
> we set TASK_DEAD that entire code path sounds brittle and
> error prone.
Yes, it is fine to schedule after release_task(). As Eric pointed out, we
don't race with call_rcu(delayed_put_task_struct), scheduler has another
reference
dup_task_struct:
/* One for us, one for whoever does the "release_task()" (usually parent) */
atomic_set(&tsk->usage,2);
However, with CONFIG_HOTPLUG_CPU we do have the problem here, but this is
off-topic. Preemption is fine, but deactivate_task() is not. We can't migrate
the deactivated released task from the dead CPU.
migrate_live_tasks() can't find the task after __unhash_process()
migrate_dead_tasks() doesn't see it after deactivate_task().
And afaics try_to_wake_up() doesn't necessary change task_cpu() if it is
offline.
No? But again, this is offtopic even if I am right.
Oleg.
next prev parent reply other threads:[~2007-11-28 16:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 13:20 /proc dcache deadlock in do_exit Andrea Arcangeli
2007-11-27 22:38 ` Andrew Morton
2007-11-28 1:21 ` Andrea Arcangeli
2007-11-28 1:45 ` Andrea Arcangeli
2007-11-28 2:07 ` Eric W. Biederman
2007-11-28 1:53 ` Eric W. Biederman
2007-11-28 1:43 ` Eric W. Biederman
2007-11-28 16:30 ` Oleg Nesterov [this message]
2007-11-28 2:09 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071128163034.GA144@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrea@suse.de \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox