From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: hillf.zj@alibaba-inc.com, mhocko@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v5] mm: Add memory allocation watchdog kernel thread.
Date: Fri, 13 May 2016 00:09:07 +0900 [thread overview]
Message-ID: <201605130009.EAJ35441.JLtFVOHFOSOMQF@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <006e01d1a9d8$5c7a15f0$156e41d0$@alibaba-inc.com>
Hillf Danton wrote:
> > +struct memalloc_info {
> > + /*
> > + * 0: not doing __GFP_RECLAIM allocation.
> > + * 1: doing non-recursive __GFP_RECLAIM allocation.
> > + * 2: doing recursive __GFP_RECLAIM allocation.
> > + */
> > + u8 valid;
> > + /*
> > + * bit 0: Will be reported as OOM victim.
> > + * bit 1: Will be reported as dying task.
> > + * bit 2: Will be reported as stalling task.
> > + * bit 3: Will be reported as exiting task.
> > + * bit 7: Will be reported unconditionally.
> > + */
> > + u8 type;
> > + /* Index used for memalloc_in_flight[] counter. */
> > + u8 idx;
>
> u8 __pad; is also needed perhaps.
>
Since this structure is not marked as __packed, I think that
the compiler will automatically pad it.
> The numbers assigned to type may be replaced with texts,
> for instance,
> MEMALLOC_TYPE_VICTIM
> MEMALLOC_TYPE_DYING
> MEMALLOC_TYPE_STALLING
> MEMALLOC_TYPE_EXITING
> MEMALLOC_TYPE_REPORT
>
I can define them as bit shift numbers. Thanks.
Michal, this version eliminated overhead of walking the process list
when nothing is wrong. You are aware of the possibility of
debug_show_all_locks() failing to report the culprit, aren't you?
So, what are unacceptable major problems for you?
--
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>
next prev parent reply other threads:[~2016-05-12 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <004b01d1a9d1$3817fc10$a847f430$@alibaba-inc.com>
2016-05-09 9:51 ` Hillf Danton
2016-05-12 15:09 ` Tetsuo Handa [this message]
2016-05-12 16:38 ` Michal Hocko
2016-05-07 14:16 Tetsuo Handa
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=201605130009.EAJ35441.JLtFVOHFOSOMQF@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
/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