Re: [PATCH] signal: Make oom_flags a bool

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

 



On Mon, 21 Mar 2016 20:38:13 +0900 Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:

> Currently the size of "struct signal_struct"->oom_flags member is
> sizeof(unsigned) bytes, but only one flag OOM_FLAG_ORIGIN which is
> updated by current thread is defined. We can convert OOM_FLAG_ORIGIN
> into a bool, and reuse the saved bytes for updating from the OOM killer
> and/or the OOM reaper thread.
> 
> By the way, do we care about a race window between run_store() and
> swapoff() because it would be theoretically possible that two threads
> sharing the "struct signal_struct" concurrently call respective
> functions? If we care, we can make oom_flags an atomic_t.

Making oom_flags atomic wouldn't fix such a race - run_store() and
swapoff() could still much with each other's state.

But no, I don't think it matters a lot - worst case is that the "wrong"
process gets oom-killed.  I think.


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