If I have this stretch of code (page is an index into a table of
page pointers):
xsp->pages[page] = get_free_page(GFP_KERNEL);
map = &mem_map[MAP_NR(xsp->pages[page])];
atomic_inc(&map->count);
the page lasts for a few accesses, but run my little test program that
mmaps the soft device that creates this segment and I eventually get a
kernel oops.
What would these lines do:
add_page_to_inode_queue(inode, map);
add_page_to_hash_queue(map, inode, page*PAGE_SIZE);
and should I add them?
I hope to collect all the results of my research in this subject and make
a Documentation file.