- 19 Mar, 2004 12 commits
-
-
Rusty Russell authored
Various files keep per-cpu caches which need to be freed/moved when a CPU goes down. All under CONFIG_HOTPLUG_CPU ifdefs. scsi.c: drain dead cpu's scsi_done_q onto this cpu. buffer.c: brelse the bh_lrus queue for dead cpu. timer.c: migrate timers from dead cpu, being careful of lock order vs __mod_timer. radix_tree.c: free dead cpu's radix_tree_preloads page_alloc.c: empty dead cpu's nr_pagecache_local into nr_pagecache, and free pages on cpu's local cache. slab.c: stop reap_timer for dead cpu, adjust each cache's free limit, and free each slab cache's per-cpu block. swap.c: drain dead cpu's lru_add_pvecs into ours, and empty its committed_space counter into global counter. dev.c: drain device queues from dead cpu into this one. flow.c: drain dead cpu's flow cache.
-
Rusty Russell authored
Keep track of kswapds: it's OK that they get moved off a node when the last CPU goes down, but when a CPU comes back, we should try to move the kswapd back onto its node.
-
Rusty Russell authored
Workqueues need to bring up/destroy the per-cpu thread on cpu up/down. 1) Add a global list of workqueues, and keep the name in the structure (to name the newly created thread). 2) Remove BUG_ON in run_workqueue, since thread is dragged off CPU when it goes down. 3) Lock out cpu up/down in flush_workqueue, create_workqueue and destroy_workqueue. 4) Add notifier to add/destroy workqueue threads, and take over work.
-
Rusty Russell authored
Change ksoftirqd not to assume it's on the CPU: when a cpu goes down, it will be rudely dragged off. Since do_softirq() uses smp_processor_id(), it's easiest to disable preemption, check that the cpu is still up, then call do_softirq(). If the cpu is actually offline, wait for the notifier, which kills us. Take over tasklets from dead cpu in the notifier. Clean up redundant double assignment in CPU_UP callback.
-
Rusty Russell authored
Add hook for RCU to handle jobs on dead cpu. Requires new tasklet_kill_immediate for RCU to clean up its tasklet (which might have been about to run, so tasklet_kill won't work).
-
Rusty Russell authored
Change the migration thread to directly use its cpu arg, rather than smp_processor_id(): if a cpu goes up then down rapidly, it can be on the wrong cpu just before it is stopped. Add code to stop the migration thread on CPU_DEAD and CPU_UP_CANCELED. Remove the (bogus) priority of the notifier.
-
Rusty Russell authored
We need the migration thread to be RT as soon as the CPU comes online: for example, stop_machine() (another RT task) expects to yield to it. Extract the core of setscheduler() and do that when the migration thread is created. rq lock is a precaution against the (theoretical) possibility of someone else doing setscheduer on this thread at the same time.
-
Rusty Russell authored
Currently the migration thread re-enables irqs, then calls move_task_away which disables IRQs again and actually does the move. This means there is a race where the migration thread gets preempted, and the target CPU can go down. Hold irqs disabled in migration thread across move_task_away(), which now doesn't need to save flags (the other caller is the hotplug CPU code, where irqs are also disabled).
-
Rusty Russell authored
Grab cpu lock around sched_migrate_task() and sys_sched_setaffinity(). This is a noop without CONFIG_HOTPLUG_CPU. The sched_migrate_task may have a performance penalty on NUMA if lots of exec rebalancing is happening, however this only applies to CONFIG_NUMA and CONFIG_HOTPLUG_CPU, which noone does at the moment anyway. Also, the scheduler in -mm solves the race another way, so this will vanish then.
-
Rusty Russell authored
Don't move tasks onto offline cpus in load_balance and wake_task (the latter is caused by a completion run from stop_machine). Note that cpu_is_offline() is a noop when CONFIG_HOTPLUG_CPU=n.
-
Rusty Russell authored
Add "online" sysfs attribute to cpus to bring them up and down. Again, only under CONFIG_HOTPLUG_CPU.
-
Rusty Russell authored
Implement cpu_down(): uses stop_machine to freeze the machine, then uses (arch-specific) __cpu_disable() and migrate_all_tasks(). Whole thing under CONFIG_HOTPLUG_CPU, so doesn't break archs which don't define that.
-
- 18 Mar, 2004 28 commits
-
-
Andrew Morton authored
From: Nikita Danilov <Nikita@Namesys.COM> remove_suid() ignores return value of notify_change()->i_op->setattr(). This mean, that even if file system fails to clear suid bit, generic_file_aio_write_nolock() proceeds with write, which is unsafe. Actually, even ext2's ->setattr() can fail, when trying to update ACL, for example. Attached patch modifies remove_suid() to return result of ->setattr(), and updates in-tree callers.
-
Andrew Morton authored
From: Stelian Pop <stelian@popies.net> This patchlet is just a resync with my tree, it only increments the meye driver version number and makes some small comment changes as suggested by Randy Dunlap.
-
Andrew Morton authored
From: Andy Whitcroft <andyw@uk.ibm.com> Whilst looking at the memory overcommit logic I noticed that the pointer to the documentation from the *_vm_enough_memory calls is incorrect. Also that in one instance the routine does not have the expected pointers.
-
Andrew Morton authored
From: Stelian Pop <stelian@popies.net> This patch removes the usage of __devinit in the srs methods of the sonypi driver, because those functions are also called from sonypi_pm_callback(). Patch originally from Randy Dunlap.
-
Andrew Morton authored
From: Grant Grundler <grundler@parisc-linux.org> This patch adds a comment to "Documentation/SubmittingDrivers" about the importance of adding a Copyright notice in submitted code. The parisc-linux port has neglected this in the past and I've been slowly trying to correct that (along with proper GPL header). While I make it sound like GPL is the "only" acceptable license, I'll leave it up to lawyers to determine what other appropriate license could be used for a new driver.
-
Andrew Morton authored
From: Carl Spalletta <ioanamitu@yahoo.com> Fix a comment bug.
-
Andrew Morton authored
From: Matt Domsch <Matt_Domsch@dell.com> Split EDD assembly code from setup.S into edd.S. This will enable it to be #included into x86-64 too.
-
Andrew Morton authored
From: Matt Domsch <Matt_Domsch@dell.com> move edd.c from arch/i386/kernel to new dir drivers/firmware. Fix up makefiles and Kconfigs.
-
Andrew Morton authored
From: Matt Domsch <Matt_Domsch@dell.com> Three patches to move the BIOS Enhanced Disk Drive code from i386-specific locations into more generic locations, which will allow it to be used on x86-64 as well. move edd.h from include/asm-i386 to include/linux
-
Andrew Morton authored
From: DHollenbeck <dick@softplc.com> This patch was needed against a pristine 2.6.4 kernel when compiling with "gcc 3.4 _very recent_" using the -Os option. Without this patch, modules would use a non-inline memcmp() and then not find it in the kernel, causing depmod to complain and some modules not to load.
-
Andrew Morton authored
From: Tim Schmielau <tim@physik3.uni-rostock.de> BSD accounting was missed in the conversion from HZ to USER_HZ. I thought nobody cared, but apparently there are still users to it.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> From: Michael Veeck <michael.veeck@gmx.net> Remove unnecessary min/max macros and changes calls to use kernel.h macros instead.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> From: Michael Veeck <michael.veeck@gmx.net> Remove unnecessary min/max macros and changes calls to use kernel.h macros instead.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> From: Michael Veeck <michael.veeck@gmx.net> Remove unnecessary min/max macros and changes calls to use kernel.h macros instead.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> From: Michael Veeck <michael.veeck@gmx.net> Patch (against 2.6.3) removes unnecessary min/max macros and changes calls to use kernel.h macros instead.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> This trivial patch fixes the bug #320: http://bugme.osdl.org/show_bug.cgi?id=320 The additional comment: http://bugme.osdl.org/show_bug.cgi?id=320#c1 Is wrong, because it will send the command twice. We only want to see if the command got success, thus is not necessary to test against < 0 (if the return value is not 1, we got a error). Note that I'm using the function (bad) style.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> Remove the rest of references to smp.tex Documentation/cpufreq => Documentation/cpu-freq DocBook/tulip.{pdf,ps,html} => DocBook/tulip-user.{pdf,ps,html} Bunch of other typos.
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> From: Luiz Fernando Capitulino <lcapitulino@prefeitura.sp.gov.br>
-
Andrew Morton authored
From: "Randy.Dunlap" <rddunlap@osdl.org> From: Luiz Fernando Capitulino <lcapitulino@prefeitura.sp.gov.br>
-
Andrew Morton authored
From: Roman Zippel <zippel@linux-m68k.org> When a boolean choice value has a dependency of 'm' it can be shortly treated as a tristate symbol. This fixes this and also add a small optimization to precompute the value of the module symbol instead of checking it all the time.
-
Andrew Morton authored
From: Roman Zippel <zippel@linux-m68k.org> This patch is by Andreas Fester <Andreas.Fester@gmx.de> and saves and restores various runtime options of qconf.
-
Andrew Morton authored
From: Roman Zippel <zippel@linux-m68k.org> This disables some debug prints, which are more confusing than helpful for normal users.
-
Andrew Morton authored
From: Roman Zippel <zippel@linux-m68k.org> conf_write() now checks the target path whether it's a directory, so it saves the config in the directory instead of renaming it.
-
Andrew Morton authored
From: Roman Zippel <zippel@linux-m68k.org> The correct link path is needed at config time to find the correct library, so let's ask gcc for the real path.
-
Andrew Morton authored
From: Brian Gerst <bgerst@didntduck.org> Don't abuse empty_zero_page as temporary storage for boot parameters and command line. This is a holdover from the days before discardable init sections.
-
Andrew Morton authored
From: Matt Mackall <mpm@selenic.com> This keeps the alignment of the init task matched with the stack size.
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> Fix a sysfs use-after-free crash. The problem we have is of the kobject going away while we have a live dentry (the corresponding sysfs directory) still pointing to it throuh d_fsdata pointer. The patch makes sure to keep the kobject alive by taking a reference to it during the life-time of corresponding dentry. o The following pins the kobject when sysfs assigns dentry and inode to the kobject. This ensures that kobject is alive during the life time of the dentry and inode, and people holding ref. to the dentry can access the kobject without any problems. o The ref. taken for the kobject is released through dentry->d_op->d_iput() call when the dentry ref. count drops to zero and it is being freed. For this sysfs_dentry_operations is introduced. For testing one has to run the following test on a SMP box: 1) Do insmod/rmmod "dummy.o" network driver in a forever loop. 2) Parallely do "find /sys/class/net | xargs cat" also in a forever loop.
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> The following patch fixes the dentry refcounting, during sysfs_remove_group() and also adds the missing dput() for the "extra" ref taken during sysfs_create() for the sub-directory dentry corresponding to attribute group.
-