History

Merge branch 'akpm' (patches from Andrew)

Merge yet more updates from Andrew Morton: "The rest of MM and a kernel-wide procfs cleanup. Summary of the more significant patches: - Patch series "mm/memory_hotplug: Factor out memory block devicehandling", v3. David Hildenbrand. Some spring-cleaning of the memory hotplug code, notably in drivers/base/memory.c - "mm: thp: fix false negative of shmem vma's THP eligibility". Yang Shi. Fix /proc/pid/smaps output for THP pages used in shmem. - "resource: fix locking in find_next_iomem_res()" + 1. Nadav Amit. Bugfix and speedup for kernel/resource.c - Patch series "mm: Further memory block device cleanups", David Hildenbrand. More spring-cleaning of the memory hotplug code. - Patch series "mm: Sub-section memory hotplug support". Dan Williams. Generalise the memory hotplug code so that pmem can use it more completely. Then remove the hacks from the libnvdimm code which were there to work around the memory-hotplug code's constraints. - "proc/sysctl: add shared variables for range check", Matteo Croce. We have about 250 instances of int zero; ... .extra1 = &zero, in the tree. This is a tree-wide sweep to make all those private "zero"s and "one"s use global variables. Alas, it isn't practical to make those two global integers const" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (38 commits) proc/sysctl: add shared variables for range check mm: migrate: remove unused mode argument mm/sparsemem: cleanup 'section number' data types libnvdimm/pfn: stop padding pmem namespaces to section alignment libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields mm/devm_memremap_pages: enable sub-section remap mm: document ZONE_DEVICE memory-model implications mm/sparsemem: support sub-section hotplug mm/sparsemem: prepare for sub-section ranges mm: kill is_dev_zone() helper mm/hotplug: kill is_dev_zone() usage in __remove_pages() mm/sparsemem: convert kmalloc_section_memmap() to populate_section_memmap() mm/hotplug: prepare shrink_{zone, pgdat}_span for sub-section removal mm/sparsemem: add helpers track active portions of a section at boot mm/sparsemem: introduce a SECTION_IS_EARLY flag mm/sparsemem: introduce struct mem_section_usage drivers/base/memory.c: get rid of find_memory_block_hinted() mm/memory_hotplug: move and simplify walk_memory_blocks() mm/memory_hotplug: rename walk_memory_range() and pass start+size instead of pfns mm: make register_mem_sect_under_node() static ...

Linus Torvalds committed 7 years ago

Commit 249be852 parents 3bfe1fc eec484471 files · +1087 −1020Browse files

Showing the changes to include/linux (8 of 71 files). Show all

Unified · Split

8 files
  1. include/linux/huge_mm.h +23 −0
  2. include/linux/memory.h +5 −6
  3. include/linux/memory_hotplug.h +4 −15
  4. include/linux/migrate.h +1 −2
  5. include/linux/mm.h +19 −19
  6. include/linux/mmzone.h +69 −19
  7. include/linux/node.h +2 −12
  8. include/linux/sysctl.h +7 −0
include/linux/huge_mm.h+23−0
@@ -121,6 +121,23 @@ static inline bool __transparent_hugepage_enabled(struct vm_area_struct *vma) · 120 unmodified lines
121 121
122bool transparent_hugepage_enabled(struct vm_area_struct *vma);122bool transparent_hugepage_enabled(struct vm_area_struct *vma);
123 123
124#define HPAGE_CACHE_INDEX_MASK (HPAGE_PMD_NR - 1)
125
126static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
127 unsigned long haddr)
128{
129 /* Don't have to check pgoff for anonymous vma */
130 if (!vma_is_anonymous(vma)) {
131 if (((vma->vm_start >> PAGE_SHIFT) & HPAGE_CACHE_INDEX_MASK) !=
132 (vma->vm_pgoff & HPAGE_CACHE_INDEX_MASK))
133 return false;
134 }
135
136 if (haddr < vma->vm_start || haddr + HPAGE_PMD_SIZE > vma->vm_end)
137 return false;
138 return true;
139}
140
124#define transparent_hugepage_use_zero_page() \141#define transparent_hugepage_use_zero_page() \
125 (transparent_hugepage_flags & \142 (transparent_hugepage_flags & \
126 (1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG))143 (1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG))
@@ -271,6 +288,12 @@ static inline bool transparent_hugepage_enabled(struct vm_area_struct *vma) · 144 unmodified lines
271 return false;288 return false;
272}289}
273 290
291static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
292 unsigned long haddr)
293{
294 return false;
295}
296
274static inline void prep_transhuge_page(struct page *page) {}297static inline void prep_transhuge_page(struct page *page) {}
275 298
276#define transparent_hugepage_flags 0UL299#define transparent_hugepage_flags 0UL
include/linux/memory.h+5−6
@@ -111,16 +111,15 @@ extern int register_memory_notifier(struct notifier_block *nb); · 110 unmodified lines
111extern void unregister_memory_notifier(struct notifier_block *nb);111extern void unregister_memory_notifier(struct notifier_block *nb);
112extern int register_memory_isolate_notifier(struct notifier_block *nb);112extern int register_memory_isolate_notifier(struct notifier_block *nb);
113extern void unregister_memory_isolate_notifier(struct notifier_block *nb);113extern void unregister_memory_isolate_notifier(struct notifier_block *nb);
114int hotplug_memory_register(int nid, struct mem_section *section);114int create_memory_block_devices(unsigned long start, unsigned long size);
115#ifdef CONFIG_MEMORY_HOTREMOVE115void remove_memory_block_devices(unsigned long start, unsigned long size);
116extern void unregister_memory_section(struct mem_section *);
117#endif
118extern int memory_dev_init(void);116extern int memory_dev_init(void);
119extern int memory_notify(unsigned long val, void *v);117extern int memory_notify(unsigned long val, void *v);
120extern int memory_isolate_notify(unsigned long val, void *v);118extern int memory_isolate_notify(unsigned long val, void *v);
121extern struct memory_block *find_memory_block_hinted(struct mem_section *,
122 struct memory_block *);
123extern struct memory_block *find_memory_block(struct mem_section *);119extern struct memory_block *find_memory_block(struct mem_section *);
120typedef int (*walk_memory_blocks_func_t)(struct memory_block *, void *);
121extern int walk_memory_blocks(unsigned long start, unsigned long size,
122 void *arg, walk_memory_blocks_func_t func);
124#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)123#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)
125#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */124#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
126 125
include/linux/memory_hotplug.h+4−15
@@ -123,20 +123,10 @@ static inline bool movable_node_is_enabled(void) · 122 unmodified lines
123 return movable_node_enabled;123 return movable_node_enabled;
124}124}
125 125
126#ifdef CONFIG_MEMORY_HOTREMOVE
127extern void arch_remove_memory(int nid, u64 start, u64 size,126extern void arch_remove_memory(int nid, u64 start, u64 size,
128 struct vmem_altmap *altmap);127 struct vmem_altmap *altmap);
129extern void __remove_pages(struct zone *zone, unsigned long start_pfn,128extern void __remove_pages(struct zone *zone, unsigned long start_pfn,
130 unsigned long nr_pages, struct vmem_altmap *altmap);129 unsigned long nr_pages, struct vmem_altmap *altmap);
131#endif /* CONFIG_MEMORY_HOTREMOVE */
132
133/*
134 * Do we want sysfs memblock files created. This will allow userspace to online
135 * and offline memory explicitly. Lack of this bit means that the caller has to
136 * call move_pfn_range_to_zone to finish the initialization.
137 */
138
139#define MHP_MEMBLOCK_API (1<<0)
140 130
141/* reasonably generic interface to expand the physical pages */131/* reasonably generic interface to expand the physical pages */
142extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,132extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
@@ -350,17 +340,16 @@ static inline void __remove_memory(int nid, u64 start, u64 size) {} · 207 unmodified lines
350#endif /* CONFIG_MEMORY_HOTREMOVE */340#endif /* CONFIG_MEMORY_HOTREMOVE */
351 341
352extern void __ref free_area_init_core_hotplug(int nid);342extern void __ref free_area_init_core_hotplug(int nid);
353extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn,
354 void *arg, int (*func)(struct memory_block *, void *));
355extern int __add_memory(int nid, u64 start, u64 size);343extern int __add_memory(int nid, u64 start, u64 size);
356extern int add_memory(int nid, u64 start, u64 size);344extern int add_memory(int nid, u64 start, u64 size);
357extern int add_memory_resource(int nid, struct resource *resource);345extern int add_memory_resource(int nid, struct resource *resource);
358extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,346extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
359 unsigned long nr_pages, struct vmem_altmap *altmap);347 unsigned long nr_pages, struct vmem_altmap *altmap);
360extern bool is_memblock_offlined(struct memory_block *mem);348extern bool is_memblock_offlined(struct memory_block *mem);
361extern int sparse_add_one_section(int nid, unsigned long start_pfn,349extern int sparse_add_section(int nid, unsigned long pfn,
362 struct vmem_altmap *altmap);350 unsigned long nr_pages, struct vmem_altmap *altmap);
363extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms,351extern void sparse_remove_section(struct mem_section *ms,
352 unsigned long pfn, unsigned long nr_pages,
364 unsigned long map_offset, struct vmem_altmap *altmap);353 unsigned long map_offset, struct vmem_altmap *altmap);
365extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,354extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
366 unsigned long pnum);355 unsigned long pnum);
include/linux/migrate.h+1−2
@@ -77,8 +77,7 @@ extern void migrate_page_copy(struct page *newpage, struct page *page); · 76 unmodified lines
77extern int migrate_huge_page_move_mapping(struct address_space *mapping,77extern int migrate_huge_page_move_mapping(struct address_space *mapping,
78 struct page *newpage, struct page *page);78 struct page *newpage, struct page *page);
79extern int migrate_page_move_mapping(struct address_space *mapping,79extern int migrate_page_move_mapping(struct address_space *mapping,
80 struct page *newpage, struct page *page, enum migrate_mode mode,80 struct page *newpage, struct page *page, int extra_count);
81 int extra_count);
82#else81#else
83 82
84static inline void putback_movable_pages(struct list_head *l) {}83static inline void putback_movable_pages(struct list_head *l) {}
include/linux/mm.h+19−19
@@ -541,6 +541,23 @@ static inline void vma_set_anonymous(struct vm_area_struct *vma) · 540 unmodified lines
541 vma->vm_ops = NULL;541 vma->vm_ops = NULL;
542}542}
543 543
544static inline bool vma_is_anonymous(struct vm_area_struct *vma)
545{
546 return !vma->vm_ops;
547}
548
549#ifdef CONFIG_SHMEM
550/*
551 * The vma_is_shmem is not inline because it is used only by slow
552 * paths in userfault.
553 */
554bool vma_is_shmem(struct vm_area_struct *vma);
555#else
556static inline bool vma_is_shmem(struct vm_area_struct *vma) { return false; }
557#endif
558
559int vma_is_stack_for_current(struct vm_area_struct *vma);
560
544/* flush_tlb_range() takes a vma, not a mm, and can care about flags */561/* flush_tlb_range() takes a vma, not a mm, and can care about flags */
545#define TLB_FLUSH_VMA(mm,flags) { .vm_mm = (mm), .vm_flags = (flags) }562#define TLB_FLUSH_VMA(mm,flags) { .vm_mm = (mm), .vm_flags = (flags) }
546 563
@@ -1620,23 +1637,6 @@ int clear_page_dirty_for_io(struct page *page); · 1073 unmodified lines
1620 1637
1621int get_cmdline(struct task_struct *task, char *buffer, int buflen);1638int get_cmdline(struct task_struct *task, char *buffer, int buflen);
1622 1639
1623static inline bool vma_is_anonymous(struct vm_area_struct *vma)
1624{
1625 return !vma->vm_ops;
1626}
1627
1628#ifdef CONFIG_SHMEM
1629/*
1630 * The vma_is_shmem is not inline because it is used only by slow
1631 * paths in userfault.
1632 */
1633bool vma_is_shmem(struct vm_area_struct *vma);
1634#else
1635static inline bool vma_is_shmem(struct vm_area_struct *vma) { return false; }
1636#endif
1637
1638int vma_is_stack_for_current(struct vm_area_struct *vma);
1639
1640extern unsigned long move_page_tables(struct vm_area_struct *vma,1640extern unsigned long move_page_tables(struct vm_area_struct *vma,
1641 unsigned long old_addr, struct vm_area_struct *new_vma,1641 unsigned long old_addr, struct vm_area_struct *new_vma,
1642 unsigned long new_addr, unsigned long len,1642 unsigned long new_addr, unsigned long len,
@@ -2767,8 +2767,8 @@ static inline void print_vma_addr(char *prefix, unsigned long rip) · 1124 unmodified lines
2767#endif2767#endif
2768 2768
2769void *sparse_buffer_alloc(unsigned long size);2769void *sparse_buffer_alloc(unsigned long size);
2770struct page *sparse_mem_map_populate(unsigned long pnum, int nid,2770struct page * __populate_section_memmap(unsigned long pfn,
2771 struct vmem_altmap *altmap);2771 unsigned long nr_pages, int nid, struct vmem_altmap *altmap);
2772pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);2772pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);
2773p4d_t *vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node);2773p4d_t *vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node);
2774pud_t *vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node);2774pud_t *vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node);
include/linux/mmzone.h+69−19
@@ -855,18 +855,6 @@ static inline int local_memory_node(int node_id) { return node_id; }; · 854 unmodified lines
855 */855 */
856#define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones)856#define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones)
857 857
858#ifdef CONFIG_ZONE_DEVICE
859static inline bool is_dev_zone(const struct zone *zone)
860{
861 return zone_idx(zone) == ZONE_DEVICE;
862}
863#else
864static inline bool is_dev_zone(const struct zone *zone)
865{
866 return false;
867}
868#endif
869
870/*858/*
871 * Returns true if a zone has pages managed by the buddy allocator.859 * Returns true if a zone has pages managed by the buddy allocator.
872 * All the reclaim decisions have to use this function rather than860 * All the reclaim decisions have to use this function rather than
@@ -1160,6 +1148,29 @@ static inline unsigned long section_nr_to_pfn(unsigned long sec) · 287 unmodified lines
1160#define SECTION_ALIGN_UP(pfn) (((pfn) + PAGES_PER_SECTION - 1) & PAGE_SECTION_MASK)1148#define SECTION_ALIGN_UP(pfn) (((pfn) + PAGES_PER_SECTION - 1) & PAGE_SECTION_MASK)
1161#define SECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SECTION_MASK)1149#define SECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SECTION_MASK)
1162 1150
1151#define SUBSECTION_SHIFT 21
1152
1153#define PFN_SUBSECTION_SHIFT (SUBSECTION_SHIFT - PAGE_SHIFT)
1154#define PAGES_PER_SUBSECTION (1UL << PFN_SUBSECTION_SHIFT)
1155#define PAGE_SUBSECTION_MASK (~(PAGES_PER_SUBSECTION-1))
1156
1157#if SUBSECTION_SHIFT > SECTION_SIZE_BITS
1158#error Subsection size exceeds section size
1159#else
1160#define SUBSECTIONS_PER_SECTION (1UL << (SECTION_SIZE_BITS - SUBSECTION_SHIFT))
1161#endif
1162
1163#define SUBSECTION_ALIGN_UP(pfn) ALIGN((pfn), PAGES_PER_SUBSECTION)
1164#define SUBSECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SUBSECTION_MASK)
1165
1166struct mem_section_usage {
1167 DECLARE_BITMAP(subsection_map, SUBSECTIONS_PER_SECTION);
1168 /* See declaration of similar field in struct zone */
1169 unsigned long pageblock_flags[0];
1170};
1171
1172void subsection_map_init(unsigned long pfn, unsigned long nr_pages);
1173
1163struct page;1174struct page;
1164struct page_ext;1175struct page_ext;
1165struct mem_section {1176struct mem_section {
@@ -1177,8 +1188,7 @@ struct mem_section { · 11 unmodified lines
1177 */1188 */
1178 unsigned long section_mem_map;1189 unsigned long section_mem_map;
1179 1190
1180 /* See declaration of similar field in struct zone */1191 struct mem_section_usage *usage;
1181 unsigned long *pageblock_flags;
1182#ifdef CONFIG_PAGE_EXTENSION1192#ifdef CONFIG_PAGE_EXTENSION
1183 /*1193 /*
1184 * If SPARSEMEM, pgdat doesn't have page_ext pointer. We use1194 * If SPARSEMEM, pgdat doesn't have page_ext pointer. We use
@@ -1209,6 +1219,11 @@ extern struct mem_section **mem_section; · 24 unmodified lines
1209extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];1219extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
1210#endif1220#endif
1211 1221
1222static inline unsigned long *section_to_usemap(struct mem_section *ms)
1223{
1224 return ms->usage->pageblock_flags;
1225}
1226
1212static inline struct mem_section *__nr_to_section(unsigned long nr)1227static inline struct mem_section *__nr_to_section(unsigned long nr)
1213{1228{
1214#ifdef CONFIG_SPARSEMEM_EXTREME1229#ifdef CONFIG_SPARSEMEM_EXTREME
@@ -1219,8 +1234,8 @@ static inline struct mem_section *__nr_to_section(unsigned long nr) · 4 unmodified lines
1219 return NULL;1234 return NULL;
1220 return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];1235 return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];
1221}1236}
1222extern int __section_nr(struct mem_section* ms);1237extern unsigned long __section_nr(struct mem_section *ms);
1223extern unsigned long usemap_size(void);1238extern size_t mem_section_usage_size(void);
1224 1239
1225/*1240/*
1226 * We use the lower bits of the mem_map pointer to store1241 * We use the lower bits of the mem_map pointer to store
@@ -1238,7 +1253,8 @@ extern unsigned long usemap_size(void); · 11 unmodified lines
1238#define SECTION_MARKED_PRESENT (1UL<<0)1253#define SECTION_MARKED_PRESENT (1UL<<0)
1239#define SECTION_HAS_MEM_MAP (1UL<<1)1254#define SECTION_HAS_MEM_MAP (1UL<<1)
1240#define SECTION_IS_ONLINE (1UL<<2)1255#define SECTION_IS_ONLINE (1UL<<2)
1241#define SECTION_MAP_LAST_BIT (1UL<<3)1256#define SECTION_IS_EARLY (1UL<<3)
1257#define SECTION_MAP_LAST_BIT (1UL<<4)
1242#define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1))1258#define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1))
1243#define SECTION_NID_SHIFT 31259#define SECTION_NID_SHIFT 3
1244 1260
@@ -1264,6 +1280,11 @@ static inline int valid_section(struct mem_section *section) · 19 unmodified lines
1264 return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP));1280 return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP));
1265}1281}
1266 1282
1283static inline int early_section(struct mem_section *section)
1284{
1285 return (section && (section->section_mem_map & SECTION_IS_EARLY));
1286}
1287
1267static inline int valid_section_nr(unsigned long nr)1288static inline int valid_section_nr(unsigned long nr)
1268{1289{
1269 return valid_section(__nr_to_section(nr));1290 return valid_section(__nr_to_section(nr));
@@ -1291,14 +1312,42 @@ static inline struct mem_section *__pfn_to_section(unsigned long pfn) · 21 unmodified lines
1291 return __nr_to_section(pfn_to_section_nr(pfn));1312 return __nr_to_section(pfn_to_section_nr(pfn));
1292}1313}
1293 1314
1294extern int __highest_present_section_nr;1315extern unsigned long __highest_present_section_nr;
1316
1317static inline int subsection_map_index(unsigned long pfn)
1318{
1319 return (pfn & ~(PAGE_SECTION_MASK)) / PAGES_PER_SUBSECTION;
1320}
1321
1322#ifdef CONFIG_SPARSEMEM_VMEMMAP
1323static inline int pfn_section_valid(struct mem_section *ms, unsigned long pfn)
1324{
1325 int idx = subsection_map_index(pfn);
1326
1327 return test_bit(idx, ms->usage->subsection_map);
1328}
1329#else
1330static inline int pfn_section_valid(struct mem_section *ms, unsigned long pfn)
1331{
1332 return 1;
1333}
1334#endif
1295 1335
1296#ifndef CONFIG_HAVE_ARCH_PFN_VALID1336#ifndef CONFIG_HAVE_ARCH_PFN_VALID
1297static inline int pfn_valid(unsigned long pfn)1337static inline int pfn_valid(unsigned long pfn)
1298{1338{
1339 struct mem_section *ms;
1340
1299 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)1341 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
1300 return 0;1342 return 0;
1301 return valid_section(__nr_to_section(pfn_to_section_nr(pfn)));1343 ms = __nr_to_section(pfn_to_section_nr(pfn));
1344 if (!valid_section(ms))
1345 return 0;
1346 /*
1347 * Traditionally early sections always returned pfn_valid() for
1348 * the entire section-sized span.
1349 */
1350 return early_section(ms) || pfn_section_valid(ms, pfn);
1302}1351}
1303#endif1352#endif
1304 1353
@@ -1330,6 +1379,7 @@ void sparse_init(void); · 25 unmodified lines
1330#define sparse_init() do {} while (0)1379#define sparse_init() do {} while (0)
1331#define sparse_index_init(_sec, _nid) do {} while (0)1380#define sparse_index_init(_sec, _nid) do {} while (0)
1332#define pfn_present pfn_valid1381#define pfn_present pfn_valid
1382#define subsection_map_init(_pfn, _nr_pages) do {} while (0)
1333#endif /* CONFIG_SPARSEMEM */1383#endif /* CONFIG_SPARSEMEM */
1334 1384
1335/*1385/*
include/linux/node.h+2−12
@@ -137,10 +137,7 @@ static inline int register_one_node(int nid) · 136 unmodified lines
137extern void unregister_one_node(int nid);137extern void unregister_one_node(int nid);
138extern int register_cpu_under_node(unsigned int cpu, unsigned int nid);138extern int register_cpu_under_node(unsigned int cpu, unsigned int nid);
139extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid);139extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid);
140extern int register_mem_sect_under_node(struct memory_block *mem_blk,140extern void unregister_memory_block_under_nodes(struct memory_block *mem_blk);
141 void *arg);
142extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk,
143 unsigned long phys_index);
144 141
145extern int register_memory_node_under_compute_node(unsigned int mem_nid,142extern int register_memory_node_under_compute_node(unsigned int mem_nid,
146 unsigned int cpu_nid,143 unsigned int cpu_nid,
@@ -171,15 +168,8 @@ static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) · 24 unmodified lines
171{168{
172 return 0;169 return 0;
173}170}
174static inline int register_mem_sect_under_node(struct memory_block *mem_blk,171static inline void unregister_memory_block_under_nodes(struct memory_block *mem_blk)
175 void *arg)
176{172{
177 return 0;
178}
179static inline int unregister_mem_sect_under_nodes(struct memory_block *mem_blk,
180 unsigned long phys_index)
181{
182 return 0;
183}173}
184 174
185static inline void register_hugetlbfs_with_node(node_registration_func_t reg,175static inline void register_hugetlbfs_with_node(node_registration_func_t reg,
include/linux/sysctl.h+7−0
@@ -37,6 +37,13 @@ struct ctl_table_root; · 36 unmodified lines
37struct ctl_table_header;37struct ctl_table_header;
38struct ctl_dir;38struct ctl_dir;
39 39
40/* Keep the same order as in fs/proc/proc_sysctl.c */
41#define SYSCTL_ZERO ((void *)&sysctl_vals[0])
42#define SYSCTL_ONE ((void *)&sysctl_vals[1])
43#define SYSCTL_INT_MAX ((void *)&sysctl_vals[2])
44
45extern const int sysctl_vals[];
46
40typedef int proc_handler (struct ctl_table *ctl, int write,47typedef int proc_handler (struct ctl_table *ctl, int write,
41 void __user *buffer, size_t *lenp, loff_t *ppos);48 void __user *buffer, size_t *lenp, loff_t *ppos);
42 49

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t