Re: [PATCH 2/4] Task notifier: Implement todo list in task_struct

From: Christoph Lameter
Date: Tue Aug 09 2005 - 12:06:19 EST


On Tue, 9 Aug 2005, Nigel Cunningham wrote:

> > No it wont. A process that has notifications to process should do that
> > before being put into the freezer. Only after the notification list is
> > empty will the process be notified and as long as the notification is
> > pending no second notification should happen.
>
> Sorry I wasn't clear. I was thinking of the case where a broken process
> doesn't process its todo list. (May it never be, but still...). How do
> we find out which one is broken? We need to traverse the todo list of
> every process, checking for outstanding freeze requests.

If a process does not handle its todo then you cannot freeze the process
at all. Something very baaaad is going on. The current version gives up if
a process cannot be frozen. This is still doing the same.

> Your reply leads me to another issue. It seems to me that you shouldn't
> wait until the todo list is empty before putting the freeze request on
> the todo list. If the todo list is ever used for something where it
> becomes hot, you might never see the todo list empty before your
> timeout, and freezing will be unreliable. Even if you do see it empty
> and insert your freeze request, it might be that more work is added
> afterwards, so you may as well just add the request whether or not the
> queue is empty.

Yes other tasks can be put on the notifier later. But the freeze notifier
was first so the task is put to sleep and will run the other notifiers
upon wakeup. The check is still okay. No additional notification should be
added if the freeze notifier is already queued.

> > I am not sure how to sort that out. I guess post the current patches that
> > you got and then we see how to continue from there.
>
> Will do shortly. Just have to go talk to my boss first :> (Separate
> issue).

The patch you sent looks fine to me.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/