linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Regarding find_get_pages{,_contig}
@ 2011-07-24 14:39 Raghavendra D Prabhu
  0 siblings, 0 replies; only message in thread
From: Raghavendra D Prabhu @ 2011-07-24 14:39 UTC (permalink / raw)
  To: linux-mm

Hi mm,

     I was looking to use 

     find_get_pages (struct address_space *mapping, pgoff_t start, unsigned int nr_pages, struct page **pages) 

     and the comment in the code says -- "There may be holes in the
     indices due to not-present pages." I perceived this to be filling
     pages which are in the cache  and skipping the ones which are not
     present -- after the function returns, pages[i] to be not set (NULL
     when pages is from a kzalloc) if corresponding page at index i +
     offset is not in cache ie. a hole. 
     
     But from what I have seen, what it does is set pages[0..nr_in_cache]
     to pages found and rest pages[nr_in_cache + 1 .. nr_pages]  to be
     unset/NULL. By looking at the code, it is calling
     radix_tree_gang_lookup_slot, which again returns entries in a
     similar way and loops nr_found times (and not nr_pages times). I
     looked at the difference between find_get_pages and
     find_get_pages_contig, and the only difference I could spot is it
     increments index which is used only when a condition is true.

     So, does holes in indices mean something else or is there a
     different function which can be used for this ?
--------------------------
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-24 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-24 14:39 Regarding find_get_pages{,_contig} Raghavendra D Prabhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).