From: Mel Gorman <mgorman@techsingularity.net>
To: GeHao Kang <kanghao0928@gmail.com>
Cc: mel@csn.ul.ie, linux-mm@kvack.org
Subject: Re: mm: Page allocation from buddy system might delay the tasks on different SMP cores
Date: Tue, 19 Apr 2016 18:59:07 +0100 [thread overview]
Message-ID: <20160419175907.GC15167@techsingularity.net> (raw)
In-Reply-To: <CANv7uPRLOS1kWos4k7aNXdx_Gx72BNxHWmJyOYs=GFydV63fAQ@mail.gmail.com>
On Wed, Apr 20, 2016 at 12:07:21AM +0800, GeHao Kang wrote:
> Hi Mel,
> Through my experiment in SMP system, I find the mm_page_alloc_zone_locked
> event produced by the fork system call on one CPU might delay the task
> on another CPU. According to the events-keme.txt in kernel documents,
> the interrupts are disabled and cache lines between CPUs are dirtied
> when this event happens. Therefore, I am afraid that a task might be
> interfered by the tasks on different CPUs
> which at the same time request memory from the buddy allocator.
>
> My questions are as follows:
> * Is it necessary to disable interrupts when allocating/freeing memory from
> buddy system?
Yes.
> * Why the cache lines between CPUs are dirtied by the allocation in
> buddy system?
>
Because a page can be freed on one CPU and allocated using another.
--
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>
prev parent reply other threads:[~2016-04-19 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 16:07 mm: Page allocation from buddy system might delay the tasks on different SMP cores GeHao Kang
2016-04-19 17:59 ` Mel Gorman [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=20160419175907.GC15167@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=kanghao0928@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/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;
as well as URLs for NNTP newsgroup(s).