From: Christophe Saout Subject: Re: Xen with dom0 pvops on ultra-recent "git tip" kernel on x86_64 Date: Sun, 11 Jan 2009 21:13:22 +0100 Message-ID: <1231704803.4831.19.camel@leto.intern.saout.de> References: <1231615355.19576.23.camel@leto.intern.saout.de> <49690103.5020706@wol.de> <1231619339.5616.15.camel@leto.intern.saout.de> <20090110203706.GW15052@edu.joroinen.fi> <1231622029.4778.1.camel@leto.intern.saout.de> <1231683478.4809.43.camel@leto.intern.saout.de> <1231685561.4809.50.camel@leto.intern.saout.de> <1231691732.5342.3.camel@leto.intern.saout.de> <1231693181.5668.4.camel@leto.intern.saout.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1231693181.5668.4.camel@leto.intern.saout.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org 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