The patch titled revert "kthread: convert stop_machine into a kthread" has been added to the -mm tree. Its filename is revert-kthread-convert-stop_machine-into-a-kthread.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: revert "kthread: convert stop_machine into a kthread" From: Andrew Morton <akpm@xxxxxxxx> Jiri reports that the stop_machin kthread conversion caused his machine to hang when suspending. Hyperthreading is apparently involved. I don't see why that would be and I can't reproduce it. Revert to the 2.6.17 code. Cc: "Serge E. Hallyn" <serue@xxxxxxxxxx> Cc: Jiri Slaby <jirislaby@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/stop_machine.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff -puN kernel/stop_machine.c~revert-kthread-convert-stop_machine-into-a-kthread kernel/stop_machine.c --- a/kernel/stop_machine.c~revert-kthread-convert-stop_machine-into-a-kthread +++ a/kernel/stop_machine.c @@ -4,7 +4,6 @@ #include <linux/cpu.h> #include <linux/err.h> #include <linux/syscalls.h> -#include <linux/kthread.h> #include <asm/atomic.h> #include <asm/semaphore.h> #include <asm/uaccess.h> @@ -26,11 +25,13 @@ static unsigned int stopmachine_num_thre static atomic_t stopmachine_thread_ack; static DECLARE_MUTEX(stopmachine_mutex); -static int stopmachine(void *unused) +static int stopmachine(void *cpu) { int irqs_disabled = 0; int prepared = 0; + set_cpus_allowed(current, cpumask_of_cpu((int)(long)cpu)); + /* Ack: we are alive */ smp_mb(); /* Theoretically the ack = 0 might not be on this CPU yet. */ atomic_inc(&stopmachine_thread_ack); @@ -84,8 +85,7 @@ static void stopmachine_set_state(enum s static int stop_machine(void) { - int ret = 0; - unsigned int i; + int i, ret = 0; struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; /* One high-prio thread per cpu. We'll do this one. */ @@ -96,16 +96,11 @@ static int stop_machine(void) stopmachine_state = STOPMACHINE_WAIT; for_each_online_cpu(i) { - struct task_struct *tsk; if (i == raw_smp_processor_id()) continue; - tsk = kthread_create(stopmachine, NULL, "stopmachine"); - if (IS_ERR(tsk)) { - ret = PTR_ERR(tsk); + ret = kernel_thread(stopmachine, (void *)(long)i,CLONE_KERNEL); + if (ret < 0) break; - } - kthread_bind(tsk, i); - wake_up_process(tsk); stopmachine_num_threads++; } _ Patches currently in -mm which might be from akpm@xxxxxxxx are origin.patch disable-debugging-version-of-write_lock.patch acpi-asus-s3-resume-fix-fix.patch sony_apci-resume.patch kauditd_thread-warning-fix.patch git-geode-fixup.patch git-gfs2.patch git-gfs2-fixup.patch git-ia64.patch git-ia64-fixup.patch git-ieee1394-fixup.patch git-klibc.patch git-hdrcleanup-vs-git-klibc-on-ia64.patch git-hdrcleanup-vs-git-klibc-on-ia64-2.patch git-libata-all.patch sata-is-bust-on-s390.patch git-netdev-all-fixup.patch 8139cp-printk-fix.patch git-e1000.patch git-e1000-fixup.patch e1000-irq-naming-update.patch drivers-net-ns83820c-add-paramter-to-disable-auto.patch af_unix-datagram-getpeersec-fix.patch git-sas.patch serial-8250-sysrq-deadlock-fix.patch serial-fix-uart_bug_txen-test.patch revert-gregkh-pci-pci-test-that-drivers-properly-call-pci_set_master.patch revert-gregkh-pci-msi-drop-pci_msi_quirk.patch revert-gregkh-pci-msi-stop-inheriting-bus-flags-and-check-root-chipset-bus-flags-instead.patch revert-gregkh-pci-msi-factorize-common-msi-detection-code-from-pci_enable_msi-and-msix.patch revert-gregkh-pci-msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch revert-gregkh-pci-msi-rename-pci_cap_id_ht_irqconf-into-pci_cap_id_ht.patch revert-gregkh-pci-msi-merge-existing-msi-disabling-quirks.patch revert-VIA-quirk-fixup-additional-PCI-IDs.patch revert-PCI-quirk-VIA-IRQ-fixup-should-only-run-for-VIA-southbridges.patch git-scsi-misc.patch areca-raid-linux-scsi-driver.patch git-scsi-target-fixup.patch pm-usb-hcds-use-pm_event_prethaw-fix.patch kill-usb-kconfig-warning.patch git-supertrak-fixup.patch bcm43xx-opencoded-locking.patch mm-x86_64-mm-init-rdtscp-warning-fix.patch sleazy-fpu-feature-x86_64-support-fix.patch x86_64-wire-up-oops_enter-oops_exit.patch adix-tree-rcu-lockless-readside-update-tidy.patch mm-tracking-shared-dirty-pages-checks.patch mm-tracking-shared-dirty-pages-wimp.patch acx1xx-wireless-driver.patch tiacx-pci-build-fix.patch tiacx-ia64-fix.patch deprecate-smbfs-in-favour-of-cifs.patch edac-new-opteron-athlon64-memory-controller-driver-tidy.patch valid_mmap_phys_addr_range-cleanup.patch x86-microcode-microcode-driver-cleanup-tidy.patch x86-microcode-add-sysfs-and-hotplug-support-fix.patch x86-microcode-add-sysfs-and-hotplug-support-fix-fix.patch reiserfs-on-demand-bitmap-loading.patch per-task-delay-accounting-taskstats-interface.patch per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays.patch delay-accounting-taskstats-interface-send-tgid-once.patch swap_prefetch-vs-zoned-counters.patch ecryptfs-mmap-operations.patch ecryptfs-alpha-build-fix.patch ecryptfs-more-elegant-aes-key-size-manipulation.patch ecryptfs-get_sb_dev-fix.patch namespaces-add-nsproxy-dont-include-compileh.patch namespaces-utsname-switch-to-using-uts-namespaces.patch namespaces-utsname-use-init_utsname-when-appropriate.patch namespaces-utsname-implement-utsname-namespaces.patch namespaces-utsname-sysctl-hack.patch ipc-namespace-core.patch task-watchers-task-watchers.patch task-watchers-add-support-for-per-task-watchers.patch readahead-sysctl-parameters-fix.patch make-copy_from_user_inatomic-not-zero-the-tail-on-i386-vs-reiser4.patch reiser4-hardirq-include-fix.patch reiser4-run-truncate_inode_pages-in-reiser4_delete_inode.patch reiser4-get_sb_dev-fix.patch reiser4-vs-zoned-allocator.patch hpt3xx-rework-rate-filtering-tidy.patch vt-remove-vt-specific-declarations-and-definitions-from-fix.patch tty-remove-include-of-screen_infoh-from-ttyh-fix.patch tty-remove-include-of-screen_infoh-from-ttyh-fix-fix.patch md-oops-workaround.patch genirq-convert-the-i386-architecture-to-irq-chips.patch genirq-x86_64-irq-reenable-migrating-irqs-to-other-cpus.patch genirq-msi-simplify-msi-enable-and-disable.patch genirq-ia64-irq-dynamic-irq-support.patch genirq-msi-only-build-msi-apicc-on-ia64-fix.patch genirq-i386-irq-remove-the-msi-assumption-that-irq-==-vector.patch srcu-rcu-variant-permitting-read-side-blocking.patch srcu-add-srcu-operations-to-rcutorture.patch srcu-2-add-srcu-operations-to-rcutorture.patch nr_blockdev_pages-in_interrupt-warning.patch device-suspend-debug.patch revert-tty-buffering-comment-out-debug-code.patch slab-leaks3-default-y.patch x86-kmap_atomic-debugging.patch revert-kthread-convert-stop_machine-into-a-kthread.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html