1530 lines · 38.4 KB · C
RawDownload
		return; 	cache = kmem_cache_create("debug_objects_cache", sizeof (struct debug_obj), 0,				  SLAB_DEBUG_OBJECTS | SLAB_NOLEAKTRACE, NULL); 	if (!cache || !debug_objects_replace_static_objects(cache)) {		debug_objects_enabled = false;		pr_warn("Out of memory.\n");		return;	} 	/*	 * Adjust the thresholds for allocating and freeing objects	 * according to the number of possible CPUs available in the	 * system.	 */	extras = num_possible_cpus() * ODEBUG_BATCH_SIZE;	pool_global.max_cnt += extras;	pool_global.min_cnt += extras; 	/* Everything worked. Expose the cache */	obj_cache = cache;	static_branch_enable(&obj_cache_enabled); #ifdef CONFIG_HOTPLUG_CPU	cpuhp_setup_state_nocalls(CPUHP_DEBUG_OBJ_DEAD, "object:offline", NULL,				  object_cpu_offline);#endif	return;}

Lines 1501–1530 of 1530. Previous lines