Example #1
0
				continue
			show_irqs(irq_list, cpu_list)
		elif o in ("-n", "--show_sockets"):
			show_sockets = True
		elif o in ("-m", "--move", "-x", "--spread"):
			if not cpu_list:
				print "tuna: --move " + _("requires a cpu list!")
				sys.exit(2)
			if not (thread_list or irq_list):
				print "tuna: --move " + _("requires a list of threads/irqs!")
				sys.exit(2)

			spread = o in ("-x", "--spread")

			if thread_list:
				tuna.move_threads_to_cpu(cpu_list, thread_list,
							 spread = spread)

			if irq_list:
				tuna.move_irqs_to_cpu(cpu_list, irq_list,
						      spread = spread)
		elif o in ("-s", "--save"):
			save(cpu_list, thread_list, a)
		elif o in ("-S", "--sockets"):
			(op, a) = pick_op(a)
			sockets = map(lambda socket: socket, a.split(","))

			if not cpu_list:
				cpu_list = []

			cpu_info = sysfs.cpus()
			op_list = []
Example #2
0
def drop_handler_move_threads_to_cpu(new_affinity, data):
    pid_list = [int(pid) for pid in data.split(",")]

    return tuna.move_threads_to_cpu(new_affinity, pid_list,
                                    set_affinity_warning)
Example #3
0
                continue
            show_irqs(irq_list, cpu_list)
        elif o in ("-n", "--show_sockets"):
            show_sockets = True
        elif o in ("-m", "--move", "-x", "--spread"):
            if not cpu_list:
                print "tuna: --move " + _("requires a cpu list!")
                sys.exit(2)
            if not (thread_list or irq_list):
                print "tuna: --move " + _("requires a list of threads/irqs!")
                sys.exit(2)

            spread = o in ("-x", "--spread")

            if thread_list:
                tuna.move_threads_to_cpu(cpu_list, thread_list, spread=spread)

            if irq_list:
                tuna.move_irqs_to_cpu(cpu_list, irq_list, spread=spread)
        elif o in ("-s", "--save"):
            save(cpu_list, thread_list, a)
        elif o in ("-S", "--sockets"):
            (op, a) = pick_op(a)
            sockets = map(lambda socket: socket, a.split(","))

            if not cpu_list:
                cpu_list = []

            cpu_info = sysfs.cpus()
            op_list = []
            for socket in sockets:
Example #4
0
def drop_handler_move_threads_to_cpu(new_affinity, data):
	pid_list = [ int(pid) for pid in data.split(",") ]

	return tuna.move_threads_to_cpu(new_affinity, pid_list,
					set_affinity_warning)