Lines Matching full:section
64 struct mem_section *section = NULL; in sparse_index_alloc() local
69 section = kzalloc_node(array_size, GFP_KERNEL, nid); in sparse_index_alloc()
71 section = memblock_alloc_node(array_size, SMP_CACHE_BYTES, in sparse_index_alloc()
73 if (!section) in sparse_index_alloc()
78 return section; in sparse_index_alloc()
84 struct mem_section *section; in sparse_index_init() local
87 * An existing section is possible in the sub-section hotplug in sparse_index_init()
89 * the existing section. in sparse_index_init()
96 section = sparse_index_alloc(nid); in sparse_index_init()
97 if (!section) in sparse_index_init()
100 mem_section[root] = section; in sparse_index_init()
139 * mem_map, we use section_mem_map to store the section's NUMA
148 static inline int sparse_early_nid(struct mem_section *section) in sparse_early_nid() argument
150 return (section->section_mem_map >> SECTION_NID_SHIFT); in sparse_early_nid()
272 unsigned long section = pfn_to_section_nr(pfn); in memory_present() local
275 sparse_index_init(section, nid); in memory_present()
276 set_section_nid(section, nid); in memory_present()
278 ms = __nr_to_section(section); in memory_present()
357 * page being freed and making a section unremovable while in sparse_early_usemaps_alloc_pgdat_section()
359 * a pgdat can prevent a section being removed. If section A in sparse_early_usemaps_alloc_pgdat_section()
360 * contains a pgdat and section B contains the usemap, both in sparse_early_usemaps_alloc_pgdat_section()
362 * from the same section as the pgdat where possible to avoid in sparse_early_usemaps_alloc_pgdat_section()
406 pr_info("node %d must be removed before remove section %ld\n", in check_usemap_section_nr()
412 * Some platforms allow un-removable section because they will just in check_usemap_section_nr()
414 * Just notify un-removable section's number here. in check_usemap_section_nr()
416 …pr_info("Section %ld and %ld (node %d) have a circular dependency on usemap and pgdat allocations\… in check_usemap_section_nr()
480 * and we want it to be properly aligned to the section size - this is in sparse_buffer_init()
573 * for each and record the physical to section mapping.
685 "section already deactivated (%#lx + %ld)\n", in clear_subsection_map()
752 * When this function is called, the removing section is in free_map_bootmem()
754 * from page allocator. If removing section's memmap is placed in free_map_bootmem()
755 * on the same section, it must not be freed. in free_map_bootmem()
784 * 1. deactivation of a partial hot-added section (only possible in
786 * a) section was present at memory init.
787 * b) section was hot-added post memory init.
788 * 2. deactivation of a complete hot-added section.
789 * 3. deactivation of a complete section from memory init.
812 * When removing an early section, the usage map is kept (as the in section_deactivate()
814 * will be re-used when re-adding the section - which is then no in section_deactivate()
815 * longer an early section. If the usage map is PageReserved, it in section_deactivate()
824 * Mark the section invalid so that valid_section() in section_deactivate()
870 * referenced. If we hot-add memory into such a section then we in section_activate()
887 * sparse_add_section - add a memory section, or populate an existing one
888 * @nid: The node to add section on
890 * @nr_pages: number of pfns to add in the section
895 * Note that only VMEMMAP supports sub-section aligned hotplug,
901 * * -EEXIST - Section has been present.
930 /* Align memmap to section boundary in the subsection case */ in sparse_add_section()
944 * A further optimization is to have per section refcounted in clear_hwpoisoned_pages()