Number of NUMA nodes can't be negative. This saves a few bytes on x86_64: add/remove: 0/0 grow/shrink: 4/21 up/down: 27/-265 (-238) Function old new delta hv_synic_alloc.cold 88 110 +22 prealloc_shrinker 260 262 +2 bootstrap 249 251 +2 sched_init_numa 1566 1567 +1 show_slab_objects 778 777 -1 s_show 1201 1200 -1 kmem_cache_init 346 345 -1 __alloc_workqueue_key 1146 1145 -1 mem_cgroup_css_alloc 1614 1612 -2 __do_sys_swapon 4702 4699 -3 __list_lru_init 655 651 -4 nic_probe 2379 2374 -5 store_user_store 118 111 -7 red_zone_store 106 99 -7 poison_store 106 99 -7 wq_numa_init 348 338 -10 __kmem_cache_empty 75 65 -10 task_numa_free 186 173 -13 merge_across_nodes_store 351 336 -15 irq_create_affinity_masks 1261 1246 -15 do_numa_crng_init 343 321 -22 task_numa_fault 4760 4737 -23 swapfile_init 179 156 -23 hv_synic_alloc 536 492 -44 apply_wqattrs_prepare 746 695 -51
Showing the changes to include/linux (1 of 12 files). Show all
Unified · Split
| @@ -444,7 +444,7 @@ static inline int next_memory_node(int nid) · 443 unmodified lines | |||
| 444 | return next_node(nid, node_states[N_MEMORY]); | 444 | return next_node(nid, node_states[N_MEMORY]); |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | extern int nr_node_ids; | 447 | extern unsigned int nr_node_ids; |
| 448 | extern int nr_online_nodes; | 448 | extern int nr_online_nodes; |
| 449 | 449 | ||
| 450 | static inline void node_set_online(int nid) | 450 | static inline void node_set_online(int nid) |
| @@ -485,7 +485,7 @@ static inline int num_node_state(enum node_states state) · 34 unmodified lines | |||
| 485 | #define first_online_node 0 | 485 | #define first_online_node 0 |
| 486 | #define first_memory_node 0 | 486 | #define first_memory_node 0 |
| 487 | #define next_online_node(nid) (MAX_NUMNODES) | 487 | #define next_online_node(nid) (MAX_NUMNODES) |
| 488 | #define nr_node_ids 1 | 488 | #define nr_node_ids 1U |
| 489 | #define nr_online_nodes 1 | 489 | #define nr_online_nodes 1 |
| 490 | 490 | ||
| 491 | #define node_set_online(node) node_set_state((node), N_ONLINE) | 491 | #define node_set_online(node) node_set_state((node), N_ONLINE) |