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] Xen with dom0 pvops on ultra-recent "git tip" kernel on

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

<Prev in Thread] Current Thread [Next in Thread>