Re: [PATCH 1/2] memory-failure: Send right signal code to correct thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 27, 2014 at 03:53:55PM -0700, Tony Luck wrote:
> >  - make sure that every thread in a recovery aware application should have
> >    a SIGBUS handler, inside which
> >    * code for SIGBUS(BUS_MCEERR_AR) is enabled for every thread
> >    * code for SIGBUS(BUS_MCEERR_AO) is enabled only for a dedicated thread
> 
> But how does the kernel know which is the special thread that
> should see the "AO" signal?  Broadcasting the signal to all
> threads seems to be just as likely to cause problems to
> an application as the h/w broadcasting MCE to all processors.

I thought that kernel doesn't have to know about which thread is the
special one if the AO signal is broadcasted to all threads, because
in such case the special thread always gets the AO signal.

The reported problem happens only the application sets PF_MCE_EARLY flag,
and such application is surely recovery aware, so we can assume that the
coders must implement SIGBUS handler for all threads. Then all other threads
but the special one can intentionally ignore AO signal. This is to avoid the
default behavior for SIGBUS ("kill all threads" as Kamil said in the previous
email.)

And I hope that downside of signal broadcasting is smaller than MCE
broadcasting because the range of broadcasting is limited to a process group,
not to the whole system.

# I don't intend to rule out other possibilities like adding another prctl
# flag, so if you have a patch, that's would be great.

Thanks,
Naoya Horiguchi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]