[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Question about the usage of spinlock
Hello, On 26/05/2016 12:07, Xu, Quan wrote: On May 26, 2016 9:31 AM, 조현권 <chkwon91@xxxxxxxxx> 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 architectureAh, 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@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |