From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by ozlabs.org (Postfix) with ESMTP id A9E59B7D6D for ; Fri, 7 May 2010 16:49:03 +1000 (EST) Received: by qyk5 with SMTP id 5so1413316qyk.3 for ; Thu, 06 May 2010 23:49:01 -0700 (PDT) MIME-Version: 1.0 Sender: pku.leo@gmail.com In-Reply-To: <20100507053851.GA25173@drongo> References: <3A45394FD742FA419B760BB8D398F9ED0183AF33@zch01exm26.fsl.freescale.net> <20100507053851.GA25173@drongo> Date: Fri, 7 May 2010 14:49:01 +0800 Message-ID: Subject: Re: Page fault on vmalloc'ed memory From: Li Yang To: Paul Mackerras Content-Type: text/plain; charset=UTF-8 Cc: linuxppc-dev@ozlabs.org, Timur Tabi , Li Yang-R58472 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, May 7, 2010 at 1:38 PM, Paul Mackerras wrote: > On Thu, May 06, 2010 at 12:28:44PM +0800, Li Yang wrote: > >> The root cause of this oops might not be related with the vmalloc'ed >> area processing in Instruction Storage Interrupt. =C2=A0But x86 does hav= e >> the code for processing it while we don't. =C2=A0Is it because we have >> nothing to do with the vmalloc'ed ISI on PowerPC architecture? > > On PowerPC we always read the kernel page tables rooted at > swapper_pg_dir to get translations for kernel addresses (those above > KERNELBASE). =C2=A0We can do that because it is kernel code (software) th= at > reads the Linux page tables. =C2=A0On x86, it is hardware that reads the > Linux page tables, and it always reads the page tables for the current > process. =C2=A0This means that the kernel part of each process's page > tables needs to contain copies of all the kernel PTEs on x86. =C2=A0To > avoid having to set a PTE in every process's page tables when doing a > vmalloc or ioremap, x86 just creates them in swapper_pg_dir and then > creates them on demand in each process's page tables as needed. > That's why they have code to handle vmalloc faults in their page fault > handler. Thanks a lot for the explanation. - Leo