6039 lines · 165.7 KB · C
RawDownload
	 * archs such as power and arm64.  As per-cpu pools created	 * previously could be missing node hint and unbound pools NUMA	 * affinity, fix them up.	 *	 * Also, while iterating workqueues, create rescuers if requested.	 */	wq_numa_init(); 	mutex_lock(&wq_pool_mutex); 	for_each_possible_cpu(cpu) {		for_each_cpu_worker_pool(pool, cpu) {			pool->node = cpu_to_node(cpu);		}	} 	list_for_each_entry(wq, &workqueues, list) {		wq_update_unbound_numa(wq, smp_processor_id(), true);		WARN(init_rescuer(wq),		     "workqueue: failed to create early rescuer for %s",		     wq->name);	} 	mutex_unlock(&wq_pool_mutex); 	/* create the initial workers */	for_each_online_cpu(cpu) {		for_each_cpu_worker_pool(pool, cpu) {			pool->flags &= ~POOL_DISASSOCIATED;			BUG_ON(!create_worker(pool));		}	} 	hash_for_each(unbound_pool_hash, bkt, pool, hash_node)		BUG_ON(!create_worker(pool)); 	wq_online = true;	wq_watchdog_init();}

Lines 6001–6039 of 6039. Previous lines