Thread (9 messages) 9 messages, 5 authors, 2021-10-19

Re: [PATCH v2 1/2] mm/vmalloc: fix numa spreading for large hash tables

From: Shakeel Butt <hidden>
Date: 2021-10-19 15:56:43
Also in: lkml

On Mon, Oct 18, 2021 at 5:23 AM Chen Wandun [off-list ref] wrote:
[...]
        /* High-order pages or fallback path if "bulk" fails. */
-       while (nr_allocated < nr_pages) {
-               struct page *page;
-               int i;

-               page = alloc_pages_node(nid, gfp, order);
+       page = NULL;
No need for the above NULL assignment.

After removing this, you can add:

Reviewed-by: Shakeel Butt <redacted>
+       while (nr_allocated < nr_pages) {
+               if (nid == NUMA_NO_NODE)
+                       page = alloc_pages(gfp, order);
+               else
+                       page = alloc_pages_node(nid, gfp, order);
                if (unlikely(!page))
                        break;

--
2.25.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help