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

From: Hidetoshi Seto
Date: Tue Jun 14 2011 - 21:30:34 EST


(2011/06/15 3:28), Tony Luck wrote:
> On Tue, Jun 14, 2011 at 11:02 AM, Tony Luck <tony.luck@xxxxxxxxx> wrote:
>> need (failing address) to take some action. That was put into
>> the ring
>
> Correction - we only put the pfn into the ring for AO (action optional)
> errors [in the current state of the patch series].
>
> But the need for a path to get the pfn from the MC handler to the
> mce_notify_process() function remains the same.

Are there any reason why we cannot have a small special buffer for AR?
For example:

# writer side:
for (i = 0; i < ar_buf_size; i++) {
if (!cmpxchg(&ar_buf[i].pid, 0, current->pid)) {
ar_buf[i].pfn = pfn;
return 0;
}
}
return -1; /* buffer full */

# reader side:
for (i = 0; i < ar_buf_size; i++) {
if (ar_buf[i].pid == current->pid) {
mce_handle_srar(ar_buf[i].pfn);
ar_buf[i].pid = 0;
}
}

I think it is not intrusive rather than having X-bytes for each thread,
which is usually 99.99% unused for its lifetime.

Or ... is it possible to push siginfo w/ addr and pop here?


Thanks,
H.Seto

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