lkml.org 
[lkml]   [2006]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: User switchable HW mappings & cie
From
Date

> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-09 23:09    [W:2.018 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site