Lines Matching refs:nid

193 void node_set_perf_attrs(unsigned int nid, struct node_hmem_attrs *hmem_attrs,  in node_set_perf_attrs()  argument
200 if (WARN_ON_ONCE(!node_online(nid))) in node_set_perf_attrs()
203 node = node_devices[nid]; in node_set_perf_attrs()
213 nid); in node_set_perf_attrs()
296 void node_add_cache(unsigned int nid, struct node_cache_attrs *cache_attrs) in node_add_cache() argument
302 if (!node_online(nid) || !node_devices[nid]) in node_add_cache()
305 node = node_devices[nid]; in node_add_cache()
359 static void node_init_caches(unsigned int nid) in node_init_caches() argument
361 INIT_LIST_HEAD(&node_devices[nid]->cache_attrs); in node_init_caches()
364 static void node_init_caches(unsigned int nid) { } in node_init_caches() argument
373 int nid = dev->id; in node_read_meminfo() local
374 struct pglist_data *pgdat = NODE_DATA(nid); in node_read_meminfo()
379 si_meminfo_node(&i, nid); in node_read_meminfo()
398 nid, K(i.totalram), in node_read_meminfo()
399 nid, K(i.freeram), in node_read_meminfo()
400 nid, K(i.totalram - i.freeram), in node_read_meminfo()
401 nid, K(swapcached), in node_read_meminfo()
402 nid, K(node_page_state(pgdat, NR_ACTIVE_ANON) + in node_read_meminfo()
404 nid, K(node_page_state(pgdat, NR_INACTIVE_ANON) + in node_read_meminfo()
406 nid, K(node_page_state(pgdat, NR_ACTIVE_ANON)), in node_read_meminfo()
407 nid, K(node_page_state(pgdat, NR_INACTIVE_ANON)), in node_read_meminfo()
408 nid, K(node_page_state(pgdat, NR_ACTIVE_FILE)), in node_read_meminfo()
409 nid, K(node_page_state(pgdat, NR_INACTIVE_FILE)), in node_read_meminfo()
410 nid, K(node_page_state(pgdat, NR_UNEVICTABLE)), in node_read_meminfo()
411 nid, K(sum_zone_node_page_state(nid, NR_MLOCK))); in node_read_meminfo()
419 nid, K(i.totalhigh), in node_read_meminfo()
420 nid, K(i.freehigh), in node_read_meminfo()
421 nid, K(i.totalram - i.totalhigh), in node_read_meminfo()
422 nid, K(i.freeram - i.freehigh)); in node_read_meminfo()
451 nid, K(node_page_state(pgdat, NR_FILE_DIRTY)), in node_read_meminfo()
452 nid, K(node_page_state(pgdat, NR_WRITEBACK)), in node_read_meminfo()
453 nid, K(node_page_state(pgdat, NR_FILE_PAGES)), in node_read_meminfo()
454 nid, K(node_page_state(pgdat, NR_FILE_MAPPED)), in node_read_meminfo()
455 nid, K(node_page_state(pgdat, NR_ANON_MAPPED)), in node_read_meminfo()
456 nid, K(i.sharedram), in node_read_meminfo()
457 nid, node_page_state(pgdat, NR_KERNEL_STACK_KB), in node_read_meminfo()
459 nid, node_page_state(pgdat, NR_KERNEL_SCS_KB), in node_read_meminfo()
461 nid, K(node_page_state(pgdat, NR_PAGETABLE)), in node_read_meminfo()
462 nid, 0UL, in node_read_meminfo()
463 nid, K(sum_zone_node_page_state(nid, NR_BOUNCE)), in node_read_meminfo()
464 nid, K(node_page_state(pgdat, NR_WRITEBACK_TEMP)), in node_read_meminfo()
465 nid, K(sreclaimable + in node_read_meminfo()
467 nid, K(sreclaimable + sunreclaimable), in node_read_meminfo()
468 nid, K(sreclaimable), in node_read_meminfo()
469 nid, K(sunreclaimable) in node_read_meminfo()
472 nid, K(node_page_state(pgdat, NR_ANON_THPS)), in node_read_meminfo()
473 nid, K(node_page_state(pgdat, NR_SHMEM_THPS)), in node_read_meminfo()
474 nid, K(node_page_state(pgdat, NR_SHMEM_PMDMAPPED)), in node_read_meminfo()
475 nid, K(node_page_state(pgdat, NR_FILE_THPS)), in node_read_meminfo()
476 nid, K(node_page_state(pgdat, NR_FILE_PMDMAPPED)) in node_read_meminfo()
479 len += hugetlb_report_node_meminfo(buf, len, nid); in node_read_meminfo()
509 int nid = dev->id; in node_read_vmstat() local
510 struct pglist_data *pgdat = NODE_DATA(nid); in node_read_vmstat()
517 sum_zone_node_page_state(nid, i)); in node_read_vmstat()
524 sum_zone_numa_event_state(nid, i)); in node_read_vmstat()
543 int nid = dev->id; in node_read_distance() local
555 i ? " " : "", node_distance(nid, i)); in node_read_distance()
693 int register_cpu_under_node(unsigned int cpu, unsigned int nid) in register_cpu_under_node() argument
698 if (!node_online(nid)) in register_cpu_under_node()
705 ret = sysfs_create_link(&node_devices[nid]->dev.kobj, in register_cpu_under_node()
712 &node_devices[nid]->dev.kobj, in register_cpu_under_node()
713 kobject_name(&node_devices[nid]->dev.kobj)); in register_cpu_under_node()
766 int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) in unregister_cpu_under_node() argument
770 if (!node_online(nid)) in unregister_cpu_under_node()
777 sysfs_remove_link(&node_devices[nid]->dev.kobj, in unregister_cpu_under_node()
780 kobject_name(&node_devices[nid]->dev.kobj)); in unregister_cpu_under_node()
795 static void do_register_memory_block_under_node(int nid, in do_register_memory_block_under_node() argument
804 mem_blk->nid = nid; in do_register_memory_block_under_node()
806 ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj, in do_register_memory_block_under_node()
810 dev_err_ratelimited(&node_devices[nid]->dev, in do_register_memory_block_under_node()
815 &node_devices[nid]->dev.kobj, in do_register_memory_block_under_node()
816 kobject_name(&node_devices[nid]->dev.kobj)); in do_register_memory_block_under_node()
820 kobject_name(&node_devices[nid]->dev.kobj), in do_register_memory_block_under_node()
831 int nid = *(int *)arg; in register_mem_block_under_node_early() local
854 if (page_nid != nid) in register_mem_block_under_node_early()
857 do_register_memory_block_under_node(nid, mem_blk); in register_mem_block_under_node_early()
871 int nid = *(int *)arg; in register_mem_block_under_node_hotplug() local
873 do_register_memory_block_under_node(nid, mem_blk); in register_mem_block_under_node_hotplug()
883 if (mem_blk->nid == NUMA_NO_NODE) in unregister_memory_block_under_nodes()
886 sysfs_remove_link(&node_devices[mem_blk->nid]->dev.kobj, in unregister_memory_block_under_nodes()
889 kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); in unregister_memory_block_under_nodes()
892 void link_mem_sections(int nid, unsigned long start_pfn, unsigned long end_pfn, in link_mem_sections() argument
903 (void *)&nid, func); in link_mem_sections()
928 static void init_node_hugetlb_work(int nid) in init_node_hugetlb_work() argument
930 INIT_WORK(&node_devices[nid]->node_work, node_hugetlb_work); in init_node_hugetlb_work()
937 int nid = mnb->status_change_nid; in node_memory_callback() local
946 if (nid != NUMA_NO_NODE) in node_memory_callback()
947 schedule_work(&node_devices[nid]->node_work); in node_memory_callback()
970 static void init_node_hugetlb_work(int nid) { } in init_node_hugetlb_work() argument
974 int __register_one_node(int nid) in __register_one_node() argument
979 node_devices[nid] = kzalloc(sizeof(struct node), GFP_KERNEL); in __register_one_node()
980 if (!node_devices[nid]) in __register_one_node()
983 error = register_node(node_devices[nid], nid); in __register_one_node()
987 if (cpu_to_node(cpu) == nid) in __register_one_node()
988 register_cpu_under_node(cpu, nid); in __register_one_node()
991 INIT_LIST_HEAD(&node_devices[nid]->access_list); in __register_one_node()
993 init_node_hugetlb_work(nid); in __register_one_node()
994 node_init_caches(nid); in __register_one_node()
999 void unregister_one_node(int nid) in unregister_one_node() argument
1001 if (!node_devices[nid]) in unregister_one_node()
1004 unregister_node(node_devices[nid]); in unregister_one_node()
1005 node_devices[nid] = NULL; in unregister_one_node()