Why __alloc_contig_migrate_range calls migrate_prep() at first?

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

 



Dear,

Sorry to trouble you.

I noticed cma_alloc would turn to  __alloc_contig_migrate_range for allocating pages.
But  __alloc_contig_migrate_range calls  migrate_prep() at first, even if the requested page
is single and free, lru_add_drain_all still run (called by  migrate_prep())?

Image a large chunk of free contig pages for CMA, various drivers may request a single page from
the CMA area, we'll get  lru_add_drain_all run for each page.

Should we detect if the required pages are free before migrate_prep(), or detect at least for single 
page allocation?

------------------
Regards,
Wang Sheng-Huiÿôèº{.nÇ+?·ÿ±éÝjg¬±¨Â+aþéì¹»®&Þ?)îÇù¦þ)í?æèw+h?¨è­Ú&£ù/iÉÿ¢¸ÿ?梷¢?ú(?¸§»þÇ?þm§ÿÿÃÿ?)îÇù¦þ?àÿðè?û^?¨¥ÿö¡­ç?¨¥¶?ÿv?íþKÚrOè®ÿzf¢?ù/iÉÿ¢¸ÿ




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]