Re: [PATCH] powerpc/eeh: remove eeh_event_handler()->daemonize()

From: Linas Vepstas
Date: Tue Aug 16 2011 - 15:24:35 EST


On 16 August 2011 14:08, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> daemonize() is only needed when a user-space task does kernel_thread().
>
> eeh_event_handler() thread is created by the worker kthread, and thus
> it doesn't need the soon-to-be-deprecated daemonize().
>
> Note: looks like eeh_event_wq can be static and it can do all work
> itself without kernel_thread().
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

I've not been following the deprecation of daemonize(), so I presume
that the suggested change is indeed appropriate.

As to the kernel thread, realize that the eeh recovery proceedure
can take many seconds, or in certain pathological situations, it
can hang (e.g. if a sata controller dies and fails to recover when
there's a mounted file system on it ..)

so, given that, I'll just say:

Acked-by: Linas Vepstas <linasvepstas@xxxxxxxxx>

BTW, if someone wants to tackle a big, difficult project, one would be
to untangle the mess that happens when the hardware underneath an
active block device dies. Currently, the kernel will deadlock in
umpteen zillion places waiting for blocks and files that will never
arrive.

--linas


> ---
>
> Âarch/powerpc/platforms/pseries/eeh_event.c | Â Â2 +-
> Â1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 3.1/arch/powerpc/platforms/pseries/eeh_event.c~3_daemonize_eeh   Â2011-04-06 21:33:42.000000000 +0200
> +++ 3.1/arch/powerpc/platforms/pseries/eeh_event.c   Â2011-08-16 21:03:56.000000000 +0200
> @@ -60,7 +60,7 @@ static int eeh_event_handler(void * dumm
>    Âstruct eeh_event    Â*event;
> Â Â Â Âstruct pci_dn *pdn;
>
> - Â Â Â daemonize ("eehd");
> + Â Â Â set_task_comm(current, "eehd");
> Â Â Â Âset_current_state(TASK_INTERRUPTIBLE);
>
> Â Â Â Âspin_lock_irqsave(&eeh_eventlist_lock, flags);
>
>
--
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/