* mm: Page allocation from buddy system might delay the tasks on different SMP cores
@ 2016-04-19 16:07 GeHao Kang
2016-04-19 17:59 ` Mel Gorman
0 siblings, 1 reply; 2+ messages in thread
From: GeHao Kang @ 2016-04-19 16:07 UTC (permalink / raw)
To: mel; +Cc: linux-mm
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?
* Why the cache lines between CPUs are dirtied by the allocation in
buddy system?
Thanks,
- Kang
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mm: Page allocation from buddy system might delay the tasks on different SMP cores
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
0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2016-04-19 17:59 UTC (permalink / raw)
To: GeHao Kang; +Cc: mel, linux-mm
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-19 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).