Re: User switchable HW mappings & cie

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

 



> Anyway, so right now you can use "vm_insert_page()" and it will increment 
> the page count and add things to the rmap lists, which is what current 
> users want. But if you don't have a normal page, you should be able to 
> basically avoid that part entirely, and just use
> 
> 	set_pte_at(mm, addr, pte, make-up-a-pte-here);
> 
> and you're done (of course, you need to use all the appropriate magic to 
> set up the pte, ie you'd normally have something like
> 
> 	pte = get_locked_pte(mm, addr, &ptl);
> 	..
> 	pte_unmap_unlock(pte, ptl);
> 
> around it). Note that "vm_insert_page()" is _not_ for VM_PFNMAP mappings, 
> exactly because it does actually increment page counts. It's for a 
> "normal" mapping that just wants to insert a reference-counted page.

Yes, that's why we want a vm_insert_pfn() as I really don't want to see
PTE manipulations proliferate in drivers :) Nick is coming up with an
implementation faster than I can think about the code anyway ;)

Cheers,
Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux