linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-mm@kvack.org, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH] signal: Make oom_flags a bool
Date: Mon, 28 Mar 2016 15:04:10 -0700	[thread overview]
Message-ID: <20160328150410.386e0435fdb16c8069ce40f5@linux-foundation.org> (raw)
In-Reply-To: <1458560293-24074-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>

On Mon, 21 Mar 2016 20:38:13 +0900 Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> 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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-03-28 22:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 11:38 Tetsuo Handa
2016-03-28 22:04 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160328150410.386e0435fdb16c8069ce40f5@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox