[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Xen with dom0 pvops on ultra-recent "git tip" kernel on x86_64


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Christophe Saout <christophe@xxxxxxxx>
  • Date: Sun, 11 Jan 2009 21:13:22 +0100
  • Delivery-date: Sun, 11 Jan 2009 12:13:58 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hello,

> > > > However, after one page of output it then Oopses somewhere during
> > > > fsck.reiserfs in "grab_swap_tokens".
> > 
> > Hmm, I found this patch in the SuSE kernel where they just return from
> > grab_swap_tokens if current->mm is NULL and claim that it can happen
> > (?).
> 
> Urks, ok, that workaround is probably total BS.  It is supposed to help
> when the current process is a kernel thread, and not reiserfsck.  So the
> point really is how come that current->mm is NULL at that point.

Ok, a bit further in my analysis:

>From googling around, it seems current->mm == NULL can be okay, but if
this is the case, the kernel should never ever try to access user pages
and hence trigger a page fault.  However, this seems to be the case
here.

It happens during process exit of reiserfsck, in exit_mmap when
unlocking the pages (reiserfsck indeed "mlockall"s itself into the
kernel).

So how does he got so far as to try to allocate swap tokens?!
(at this points the memory usage isn't even close to requiring swapping
anyway)

The path where it goes wrong is something like:

exit_mmap -> munlock_vma_pages_all -> munlock_vma_pages_range
-> __mlock_vma_pages_range -> __get_user_pages -> handle_mm_fault
-> handle_pte_fault -> do_swap_page -> grab_swap_token

Cheers,
        Christophe



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.