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@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>