WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xenpaging crashes xen in is_iomem_page()

On 9 August 2010 13:39, Olaf Hering <olaf@xxxxxxxxx> wrote:
> On Mon, Aug 09, Patrick Colp wrote:
>
>> > after playing a bit more with xenpaging, its not working for me.
>> >
>> > Whats your environment?
>> >
>> > I have a plain SLES11 SP1 x86_64 installation on a Xeon X5550 box.
>> > The client is also a plain SLES11 SP1 x86_64.
>> > Once I boot the client and start xenpaging with 256mb, the client gets
>> > lots of SIGBUS or SIGSEGV.
>> > Xen prints 'Iomem mapping not permitted ffffffffff (domain 1)' in
>> > grant_table.c:__gnttab_map_grant_ref()
>>
>> Hi Olaf,
>>
>> Thanks for the info. This sounds like an issue with PV drivers.
>> Unfortunately I haven't been able to properly vet the PV driver stuff
>> yet, but I'll try to get on it as soon as I can.
>
> Patrick,
>
> in xenpaging.c:main() there is that loop which evicts pages before it
> enters the while(1) loop. Since that loop will take some time before it
> proceeds and receives events from xen, what will happen with page-in
> requests during the initial evict loop? Are they queued up, or could
> they cause all the errors during client bootup?

There is a shared ring for xenpaging between the tool and Xen. Paging
requests are placed in this ring and if it's full, the guest is
paused. However, the VCPU that accesses a paged out page is pause as
well until the request is satisfied. Therefore, there should be no
issue with the evict loop being first. If the guest accesses a paged
out page while the eviction process is taking place, it is paused
until all the pages are evicted and the tool handles the request and
pages it back in.

> I tried to move the initial evict_victim() calls into the while(1) loop.
> If there is no event from xc_wait_for_event_or_timeout(), fill &victims
> one by one.
>
> My attempt looks basically like shown below.
> Unfortunately, it crashes xen itself in odd ways. I will look at this
> route further tomorrow.

It's not immediately clear to me why your change wouldn't work.


> Also, what is the best time to run xenpaging. If its called very early,
> right after xm start <domainname>, it will cause a crash in the client
> when the kernel is still initializing itself. Should there be some kind
> of event from the guest when its ready? Early boot skripts could create
> such an event.

It should be possible to run xenpaging pretty well right from starting
up a guest. I believe there is no realmode support, so if the guest
starts in realmode then xenpaging couldn't be initiated until after
that.


Patrick

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel