linux-IllusionX/lib
Qian Cai a9ee3a63db debugobjects: call debug_objects_mem_init eariler
The current value of the early boot static pool size, 1024 is not big
enough for systems with large number of CPUs with timer or/and workqueue
objects selected.  As the results, systems have 60+ CPUs with both timer
and workqueue objects enabled could trigger "ODEBUG: Out of memory.
ODEBUG disabled".

Some debug objects are allocated during the early boot.  Enabling some
options like timers or workqueue objects may increase the size required
significantly with large number of CPUs.  For example,

CONFIG_DEBUG_OBJECTS_TIMERS:
No. CPUs x 2 (worker pool) objects:
start_kernel
  workqueue_init_early
    init_worker_pool
      init_timer_key
        debug_object_init

plus No. CPUs objects (CONFIG_HIGH_RES_TIMERS):
sched_init
  hrtick_rq_init
    hrtimer_init

CONFIG_DEBUG_OBJECTS_WORK:
No. CPUs objects:
vmalloc_init
  __init_work

plus No. CPUs x 6 (workqueue) objects:
workqueue_init_early
  alloc_workqueue
    __alloc_workqueue_key
      alloc_and_link_pwqs
        init_pwq

Also, plus No. CPUs objects:
perf_event_init
  __init_srcu_struct
    init_srcu_struct_fields
      init_srcu_struct_nodes
        __init_work

However, none of the things are actually used or required before
debug_objects_mem_init() is invoked, so just move the call right before
vmalloc_init().

According to tglx, "the reason why the call is at this place in
start_kernel() is historical.  It's because back in the days when
debugobjects were added the memory allocator was enabled way later than
today."

Link: http://lkml.kernel.org/r/20181126102407.1836-1-cai@gmx.us
Signed-off-by: Qian Cai <cai@gmx.us>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-28 12:11:45 -08:00
..
842
fonts
lz4 lib/lz4: update LZ4 decompressor module 2018-10-31 08:54:14 -07:00
lzo
mpi
raid6 raid6/ppc: Fix build for clang 2018-12-20 20:53:11 +11:00
reed_solomon
xz
zlib_deflate
zlib_inflate lib/zlib_inflate/inflate.c: remove fall through warnings 2018-10-31 08:54:13 -07:00
zstd
.gitignore
argv_split.c
ashldi3.c
ashrdi3.c
asn1_decoder.c
assoc_array.c
atomic64.c
atomic64_test.c
audit.c
bcd.c
bch.c
bitmap.c lib/bitmap.c: simplify bitmap_print_to_pagebuf() 2018-10-31 08:54:12 -07:00
bitrev.c
bsearch.c
btree.c
bucket_locks.c
bug.c
build_OID_registry
bust_spinlocks.c
chacha.c crypto: chacha - add XChaCha12 support 2018-11-20 14:26:55 +08:00
check_signature.c
checksum.c
clz_ctz.c
clz_tab.c
cmdline.c
cmpdi2.c
compat_audit.c
cordic.c lib: cordic: Move cordic macros and defines to header file 2018-11-29 17:30:48 +02:00
cpu_rmap.c
cpumask.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc4.c
crc7.c
crc8.c
crc16.c
crc32.c
crc32defs.h
crc32test.c
crc64.c
ctype.c
debug_info.c
debug_locks.c
debugobjects.c debugobjects: call debug_objects_mem_init eariler 2018-12-28 12:11:45 -08:00
dec_and_lock.c
decompress.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c
devres.c
digsig.c
div64.c
dump_stack.c
dynamic_debug.c
dynamic_queue_limits.c
earlycpio.c
error-inject.c
errseq.c
extable.c
fault-inject.c
fdt.c
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
find_bit.c
find_bit_benchmark.c
flex_array.c
flex_proportions.c
gcd.c lib/gcd: Remove use of CPU_NO_EFFICIENT_FFS macro 2018-11-12 14:26:21 -08:00
gen_crc32table.c
gen_crc64table.c
genalloc.c
glob.c
globtest.c
hexdump.c
hweight.c
idr.c
inflate.c
int_sqrt.c
interval_tree.c
interval_tree_test.c
iomap.c
iomap_copy.c
iommu-helper.c
ioremap.c
iov_iter.c iov_iter: teach csum_and_copy_to_iter() to handle pipe-backed ones 2018-11-25 16:24:49 -05:00
irq_poll.c
irq_regs.c
is_single_threaded.c
jedec_ddr_data.c
kasprintf.c
Kconfig lib: introduce initial implementation of object aggregation manager 2018-11-15 14:43:43 -08:00
Kconfig.debug lib: introduce initial implementation of object aggregation manager 2018-11-15 14:43:43 -08:00
Kconfig.kasan kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS 2018-12-28 12:11:43 -08:00
Kconfig.kgdb
Kconfig.ubsan
kfifo.c
klist.c
kobject.c
kobject_uevent.c
kstrtox.c lib/kstrtox.c: delete unnecessary casts 2018-10-31 08:54:13 -07:00
kstrtox.h
lcm.c
libcrc32c.c
list_debug.c
list_sort.c
llist.c
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-rtmutex.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c
lockref.c
logic_pio.c
lru_cache.c
lshrdi3.c
Makefile Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-12-27 13:53:32 -08:00
memcat_p.c
memory-notifier-error-inject.c
memweight.c
muldi3.c
net_utils.c
netdev-notifier-error-inject.c
nlattr.c
nmi_backtrace.c
nodemask.c
notifier-error-inject.c
notifier-error-inject.h
objagg.c lib: introduce initial implementation of object aggregation manager 2018-11-15 14:43:43 -08:00
of-reconfig-notifier-error-inject.c
oid_registry.c
once.c
parman.c
parser.c lib/parser.c: switch match_number() over to use match_strdup() 2018-10-31 08:54:12 -07:00
pci_iomap.c
percpu-refcount.c percpu-refcount: Replace call_rcu_sched() with call_rcu() 2018-11-27 09:21:45 -08:00
percpu_counter.c
percpu_test.c
plist.c
pm-notifier-error-inject.c
prime_numbers.c
radix-tree.c radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
random32.c
ratelimit.c
rational.c
rbtree.c
rbtree_test.c
reciprocal_div.c
refcount.c
rhashtable.c rhashtable: detect when object movement between tables might have invalidated a lookup 2018-12-03 15:31:55 -08:00
sbitmap.c
scatterlist.c
seq_buf.c
sg_pool.c lib/sg_pool.c: remove unnecessary null check when freeing object 2018-10-31 08:54:13 -07:00
sg_split.c
sha1.c
sha256.c
show_mem.c
siphash.c
smp_processor_id.c
sort.c
stackdepot.c
stmp_device.c
string.c
string_helpers.c
strncpy_from_user.c
strnlen_user.c
syscall.c
test-kstrtox.c
test-string_helpers.c
test_bitfield.c
test_bitmap.c
test_bpf.c net: remove VLAN_TAG_PRESENT 2018-11-16 19:25:29 -08:00
test_debug_virtual.c lib: fix build failure in CONFIG_DEBUG_VIRTUAL test 2018-12-17 22:12:30 +11:00
test_firmware.c test_firmware: fix error return getting clobbered 2018-11-11 09:18:04 -08:00
test_hash.c
test_hexdump.c test_hexdump: use memcpy instead of strncpy 2018-11-30 12:13:15 -08:00
test_ida.c
test_kasan.c
test_kmod.c lib/test_kmod.c: fix rmmod double free 2018-11-30 14:56:14 -08:00
test_list_sort.c
test_memcat_p.c
test_module.c
test_objagg.c test_objagg: Fix warning. 2018-11-15 14:57:09 -08:00
test_overflow.c
test_parman.c
test_printf.c
test_rhashtable.c test_rhashtable: remove semaphore usage 2018-12-18 15:12:53 -08:00
test_siphash.c
test_sort.c
test_static_key_base.c
test_static_keys.c
test_string.c
test_sysctl.c
test_ubsan.c
test_user_copy.c
test_uuid.c
test_xarray.c XArray: Fix xa_alloc when id exceeds max 2018-12-13 14:07:33 -05:00
textsearch.c
timerqueue.c
ts_bm.c
ts_fsm.c
ts_kmp.c
ubsan.c lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn 2018-11-18 10:15:10 -08:00
ubsan.h
ucmpdi2.c
ucs2_string.c
usercopy.c
uuid.c
vsprintf.c
win_minmax.c
xarray.c XArray: Fix xa_alloc when id exceeds max 2018-12-13 14:07:33 -05:00
xxhash.c