Messages in this thread | | | Date | Tue, 13 Jul 2010 08:20:09 +0100 | From | Russell King - ARM Linux <> | Subject | Re: [RFC] Tight check of pfn_valid on sparsemem |
| |
On Tue, Jul 13, 2010 at 03:04:00PM +0900, Minchan Kim wrote: > > __get_user() works with TLB and page table, the vaddr is really mapped or not. > > If you got SEGV, __get_user() returns -EFAULT. It works per page granule.
Not in kernel space. It works on 1MB sections there.
Testing whether a page is mapped by __get_user is a hugely expensive way to test whether a PFN is valid. It'd be cheaper to use our flatmem implementation of pfn_valid() instead.
| |