Re: [POC] mce: replace TIF_MCE_NOTIFY with TIF_USER_RETURN_NOTIFY

From: Avi Kivity
Date: Sun Jun 05 2011 - 09:55:57 EST


On 05/28/2011 03:35 AM, Luck, Tony wrote:
[Oops - forgot to Cc: LKML!]
Ingo wrote:
> We already have a generic facility to do such things at
> return-to-userspace: _TIF_USER_RETURN_NOTIFY.

This is what it might look like if we replaced the current use
of TIF_MCE_NOTIFY with TIF_USER_RETURN_NOTIFY in mce.c

Question: the notifier can potentially send signals to the current
process - so should the check for _TIF_USER_RETURN_NOTIFY in do_notify_resume
be moved before the check for _TIF_SIGPENDING?

It is unnecessary. If a signal is raised, then _TIF_SIGPENDING will be ORed into the flags, and when we try to return again, we'll notice it and go right back into do_notify_resume().

Would doing do be a problem
for the existing user of user-return-notifiers (kvm)?

It would not be a problem. The orders of the checks should be immaterial.

<snip patch>

Looks good.

--
error compiling committee.c: too many arguments to function

--
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/