On Tue, Jun 26, 2018 at 11:46:35AM +0800, Wei Wang wrote:
mm/ code is well positioned to handle all this correctly.
That wouldn't be a good choice for us. If we check how the regular
+ if (!arrays)So we are getting a ton of memory here just to free it up a bit later.
+ return NULL;
+
+ for (i = 0; i < max_array_num; i++) {
Why doesn't get_from_free_page_list get the pages from free list for us?
We could also avoid the 1st allocation then - just build a list
of these.
allocation works, there are many many things we need to consider when pages
are allocated to users.
For example, we need to take care of the nr_free
counter, we need to check the watermark and perform the related actions.
Also the folks working on arch_alloc_page to monitor page allocation
activities would get a surprise..if page allocation is allowed to work in
this way.