Re: [PATCH 1/5] x86, mce: rework use of TIF_MCE_NOTIFY

From: huang ying
Date: Thu Sep 08 2011 - 22:23:26 EST


On Thu, Sep 1, 2011 at 6:25 AM, Luck, Tony <tony.luck@xxxxxxxxx> wrote:
> From: Â "Luck, Tony" <tony.luck@xxxxxxxxx>
>
> From: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
>
> The basic flow of MCE handler is summarized as follows:
> Â1) from NMI context:
> Â Â Â Âcheck hardware error registers, determine error severity,
> Â Â Â Âand then panic or request non-NMI context by irq_work() to
> Â Â Â Âcontinue the system.
> Â2) from (irq) context:
> Â Â Â Âcall non-NMI safe functions,
> Â Â Â Âwake up loggers and schedule work if required
> Â3) from worker thread:
> Â Â Â Âprocess some time-consuming works like memory poisoning.
>
> TIF_MCE_NOTIFY flag is relatively legacy and have used to do tasks of
> 2) and 3) on the thread context that interrupted by MCE. ÂHowever now
> use of irq_work() and work-queue is enough for these tasks, so this
> patch removes duplicated tasks in mce_notify_process().

Sorry for late.

Why do you think work-queue is enough for these tasks? Work-queue
thread may have low priority. But the hardware error should be
processed as soon as possible for better error containment. So I
think it is still a good idea to process error before returning to
user space. That likes scheduling to the work directly before
returning to user space. We can use "return to user notifier" to
implement this.

Best Regards,
Huang Ying
--
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/