Hello,
On 26/05/2016 12:07, Xu, Quan wrote:
On May 26, 2016 9:31 AM, 조현권 <chkwo...@gmail.com> wrote:
I am studying xen 4.6.0 version now and wonder the usage of spinlock which is
located in free_heap_pages(xen/common/page_alloc. c)
As its memory setup is ahead of multicore initialization, spinlock seems to be
unnecessary during booting because it uses only single core
spinlock looks required after multicore initialization finished and when xen
needs to free memory space during work
However i experimented not to use spin lock in free_heap_pages and
dom0(linux-kernel) was booted well. It does not cause any error using internet
or application program even reboot
Are therr any special reason to use spinlock?
My experiment environment was ODROID-XU4 which uses arm architecture
Ah, you can try to test more for DomU..
Please try to be helpful when answering to a question. I.e provide
comment which will help to understand the need (or not) of spinlock.
In this case, booting a single domU will unlikely exacerbate the need of
spinlock because you need concurrent call to {alloc,free}_heap_pages.
The easiest way would be creating/destroying multiple guests at the same
time.
Anyway, Xen will need to manage memory (with {alloc,free}_heap_pages)
after boot, such as allocating/freeing internal structure associated to
a domain/vCPU. Search for {alloc,free}_xenheap_pages, which are helpers
for *_heap_pages.
After Xen has finished to boot, the memory can be managed from any CPUs.
So the code in those functions need to be protected against concurrent
access.
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel