On 01/28/2017 01:55 PM, Ahmed Samy wrote:
On Sat, Jan 28, 2017 at 01:48:46PM -0800, John Hubbard wrote:
Quick question, what do you mean "a function as part of vmalloc"?
Take a look at `vmap()', it should be like that API. Dunno if vmap can be used
in place, haven't tried, maybe can get `struct page` and then use vmap? I
don't know, what do you think?
Right, vmap is probably what you're looking for here. The way this story usually goes in my
experience is: if you're actually dealing with real RAM, you are also dealing in struct pages. So
you lookup the struct pages, keep track of them, (maybe also pin them with get_user_pages), and then
map them with vmap.
Beyond the out-of-tree driver that I'm supporting (which uses vmap in that way), there are also a
*lot* of in-tree examples that also do it.
Are you buying this? :)
thanks
john h
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>