- 24 2月, 2009 2 次提交
-
-
由 Tejun Heo 提交于
Impact: cleanup and addition of missing interface wrapper The interface functions in bootmem.h was ordered in not so orderly manner. Reorder them such that * functions allocating the same area group together - ie. alloc_bootmem group and alloc_bootmem_low group. * functions w/o node parameter come before the ones w/ node parameter. * nopanic variants are immediately below their panicky counterparts. While at it, add alloc_bootmem_pages_node_nopanic() which was missing. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Johannes Weiner <hannes@saeurebad.de>
-
由 Tejun Heo 提交于
Impact: cleaner and consistent bootmem wrapping By setting CONFIG_HAVE_ARCH_BOOTMEM_NODE, archs can define arch-specific wrappers for bootmem allocation. However, this is done a bit strangely in that only the high level convenience macros can be changed while lower level, but still exported, interface functions can't be wrapped. This not only is messy but also leads to strange situation where alloc_bootmem() does what the arch wants it to do but the equivalent __alloc_bootmem() call doesn't although they should be able to be used interchangeably. This patch updates bootmem such that archs can override / wrap the backend function - alloc_bootmem_core() instead of the highlevel interface functions to allow simpler and consistent wrapping. Also, HAVE_ARCH_BOOTMEM_NODE is renamed to HAVE_ARCH_BOOTMEM. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Johannes Weiner <hannes@saeurebad.de>
-
- 20 2月, 2009 6 次提交
-
-
由 Tejun Heo 提交于
Impact: new scalable dynamic percpu allocator which allows dynamic percpu areas to be accessed the same way as static ones Implement scalable dynamic percpu allocator which can be used for both static and dynamic percpu areas. This will allow static and dynamic areas to share faster direct access methods. This feature is optional and enabled only when CONFIG_HAVE_DYNAMIC_PER_CPU_AREA is defined by arch. Please read comment on top of mm/percpu.c for details. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org>
-
由 Tejun Heo 提交于
Impact: two more public map/unmap functions Implement map_kernel_range_noflush() and unmap_kernel_range_noflush(). These functions respectively map and unmap address range in kernel VM area but doesn't do any vcache or tlb flushing. These will be used by new percpu allocator. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Nick Piggin <nickpiggin@yahoo.com.au>
-
由 Tejun Heo 提交于
Impact: allow multiple early vm areas There are places where kernel VM area needs to be allocated before vmalloc is initialized. This is done by allocating static vm_struct, initializing several fields and linking it to vmlist and later vmalloc initialization picking up these from vmlist. This is currently done manually and if there's more than one such areas, there's no defined way to arbitrate who gets which address. This patch implements vm_area_register_early(), which takes vm_area struct with flags and size initialized, assigns address to it and puts it on the vmlist. This way, multiple early vm areas can determine which addresses they should use. The only current user - alpha mm init - is converted to use it. Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Tejun Heo 提交于
Impact: kill unused functions percpu_alloc() and its friends never saw much action. It was supposed to replace the cpu-mask unaware __alloc_percpu() but it never happened and in fact __percpu_alloc_mask() itself never really grew proper up/down handling interface either (no exported interface for populate/depopulate). percpu allocation is about to go through major reimplementation and there's no reason to carry this unused interface around. Replace it with __alloc_percpu() and free_percpu(). Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Rusty Russell 提交于
This prepares for a real __alloc_percpu, by adding an alignment argument. Only one place uses __alloc_percpu directly, and that's for a string. tj: af_inet also uses __alloc_percpu(), update it. Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Jens Axboe <axboe@kernel.dk>
-
由 Rusty Russell 提交于
Impact: cleanup There are two allocated per-cpu accessor macros with almost identical spelling. The original and far more popular is per_cpu_ptr (44 files), so change over the other 4 files. tj: kill percpu_ptr() and update UP too Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Cc: mingo@redhat.com Cc: lenb@kernel.org Cc: cpufreq@vger.kernel.org Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 10 2月, 2009 1 次提交
-
-
由 Tejun Heo 提交于
ELF core dump is used for both user land core dump and kernel crash dump. Depending on architecture, register might need to be accessed differently for userland and kernel. Allow architectures to define ELF_CORE_COPY_KERNEL_REGS() and use different operation for kernel register dump. Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NIngo Molnar <mingo@elte.hu>
-
- 09 2月, 2009 2 次提交
-
-
由 Brian Gerst 提交于
Impact: bug fix IA-64 needs to put percpu data in the seperate section even on UP. Fixes regression caused by "percpu: refactor percpu.h" Signed-off-by: NBrian Gerst <brgerst@gmail.com> Acked-by: NTony Luck <tony.luck@intel.com> Signed-off-by: NIngo Molnar <mingo@elte.hu>
-
由 Cornelia Huck 提交于
Rename the async_*_special() functions to async_*_domain(), which describes the purpose of these functions much better. [Broke up long lines to silence checkpatch] Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
-
- 08 2月, 2009 1 次提交
-
-
由 Rusty Russell 提交于
Impact: fix spurious BUG_ON() triggered under load module_refcount() isn't reliable outside stop_machine(), as demonstrated by Karsten Keil <kkeil@suse.de>, networking can trigger it under load (an inc on one cpu and dec on another while module_refcount() is tallying can give false results, for example). Almost noone should be using __module_get, but that's another issue. Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 06 2月, 2009 3 次提交
-
-
由 Johannes Weiner 提交于
With exclusive waiters, every process woken up through the wait queue must ensure that the next waiter down the line is woken when it has finished. Interruptible waiters don't do that when aborting due to a signal. And if an aborting waiter is concurrently woken up through the waitqueue, noone will ever wake up the next waiter. This has been observed with __wait_on_bit_lock() used by lock_page_killable(): the first contender on the queue was aborting when the actual lock holder woke it up concurrently. The aborted contender didn't acquire the lock and therefor never did an unlock followed by waking up the next waiter. Add abort_exclusive_wait() which removes the process' wait descriptor from the waitqueue, iff still queued, or wakes up the next waiter otherwise. It does so under the waitqueue lock. Racing with a wake up means the aborting process is either already woken (removed from the queue) and will wake up the next waiter, or it will remove itself from the queue and the concurrent wake up will apply to the next waiter after it. Use abort_exclusive_wait() in __wait_event_interruptible_exclusive() and __wait_on_bit_lock() when they were interrupted by other means than a wake up through the queue. [akpm@linux-foundation.org: coding-style fixes] Reported-by: NChris Mason <chris.mason@oracle.com> Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org> Mentored-by: NOleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Chuck Lever <cel@citi.umich.edu> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Ingo Molnar <mingo@elte.hu> Cc: <stable@kernel.org> ["after some testing"] Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Andrea Righi 提交于
Avoid calling copy_from/to_user() with fb_info->lock mutex held in fbmem ioctl(). fb_mmap() is called under mm->mmap_sem (A) held, that also acquires fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does copy_from/to_user() that might acquire mm->mmap_sem (A), causing a deadlock. NOTE: it doesn't push down the fb_info->lock in each own driver's fb_ioctl(), so there are still potential deadlocks elsewhere. Signed-off-by: NAndrea Righi <righi.andrea@gmail.com> Cc: Dave Jones <davej@redhat.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Johannes Weiner <hannes@saeurebad.de> Cc: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Harvey Harrison <harvey.harrison@gmail.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Peter Zijlstra 提交于
The swap() macro is accidentally retuning the value of its first argument. Change it into a doesn't-return-anything macro before someone goes and relies upon this behaviour. Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wu Fengguang <wfg@linux.intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 05 2月, 2009 1 次提交
-
-
由 Timothy S. Nelson 提交于
This patch makes the ROM reading code return an error to user space if the size of the ROM read is equal to 0. The patch also emits a warnings if the contents of the ROM are invalid, and documents the effects of the "enable" file on ROM reading. Signed-off-by: NTimothy S. Nelson <wayland@wayland.id.au> Acked-by: NAlex Villacis-Lasso <a_villacis@palosanto.com> Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
-
- 03 2月, 2009 6 次提交
-
-
由 Randy Dunlap 提交于
Add kernel-doc notation for @lock: include/linux/sched.h:457: No description found for parameter 'lock' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NIngo Molnar <mingo@elte.hu>
-
由 Tejun Heo 提交于
3Gbps is often much more prone to transmission failures. It's usually okay to let EH handle speed down after transmission failures but some WD My Book drives completely shutdown after certain transmission failures and after it only power cycling can revive them. Combined with the fact that external drives often end up with cable assembly which is longer than usual and more likely to have intervening gender, this makes these drives very likely to shutdown under certain configurations virtually rendering them unusable. This patch implements HOARKGE_1_5_GBPS and applies it to WD My Book such that 1.5Gbps is forced once the device is identified. Please take a look at the following bz for related reports. http://bugzilla.kernel.org/show_bug.cgi?id=9913Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Tejun Heo 提交于
dev->ering used to be cleared together with the rest of ata_device in ata_dev_init() which is called whenever a probing event occurs. dev->ering is about to be used to track probing failures so it needs to remain persistent over multiple porbing events. This patch achieves this by doing the following. * Instead of CLEAR_OFFSET, define CLEAR_BEGIN and CLEAR_END and only clear between BEGIN and END. ering is moved after END. The split of persistent area is to allow hotter items remain at the head. * ering is explicitly cleared on ata_dev_disable() and when device attach succeeds. So, ering is persistent throug a device's life time (unless explicitly cleared of course) and also through periods inbetween disablement of an attached device and successful detection of the next one. Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Sergei Shtylyov 提交于
When checking for the CFA feature set support, ata_id_is_cfa() tests bit 2 in word 82 of the identify data instead the word 83; it also checks the ATA/PI version support in the word 80 (which the CompactFlash specifications have as reserved), this having no slightest chance to work on the modern CF cards that don't have 0x848A in the word 0... Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Eric Dumazet 提交于
Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is using a lot of memory. Each 'struct module' contains an [NR_CPUS] array of full cache lines. This patch uses existing infrastructure (percpu_modalloc() & percpu_modfree()) to allocate percpu space for the refcount storage. Instead of wasting NR_CPUS*128 bytes (on i386), we now use nr_cpu_ids*sizeof(local_t) bytes. On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce size of module files by about 2 Mbytes. (1Kb per module) Instead of having all refcounters in the same memory node - with TLB misses because of vmalloc() - this new implementation permits to have better NUMA properties, since each CPU will use storage on its preferred node, thanks to percpu storage. Signed-off-by: NEric Dumazet <dada1@cosmosbay.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 David S. Miller 提交于
Reported by Andrew Walrond <andrew@walrond.org> Changeset c19e654d ("gre: Add netlink interface") added an include of linux/ip.h to linux/if_tunnel.h We can't really let that get exposed to userspace because this conflicts with types defined in netinet/ip.h which userland is almost certainly going to have included either explicitly or implicitly. So guard this include with a __KERNEL__ ifdef. Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 02 2月, 2009 3 次提交
-
-
由 Alberto Bertogli 提交于
bvec_kmap_irq() and bvec_kunmap_irq() comments say they MUST be inlined, so mark them as __always_inline. Signed-off-by: NAlberto Bertogli <albertito@blitiri.com.ar> Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
-
由 Alberto Bertogli 提交于
The comment says "remember to add offset!", but the function already adds it. Signed-off-by: NAlberto Bertogli <albertito@blitiri.com.ar> Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
-
由 Jens Axboe 提交于
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
-
- 31 1月, 2009 15 次提交
-
-
由 Sebastien Dugue 提交于
Impact: fix CPU hotplug hang on Power6 testbox On architectures that support offlining all cpus (at least powerpc/pseries), hot-unpluging the tick_do_timer_cpu can result in a system hang. This comes from the fact that if the cpu going down happens to be the cpu doing the tick, then as the tick_do_timer_cpu handover happens after the cpu is dead (via the CPU_DEAD notification), we're left without ticks, jiffies are frozen and any task relying on timers (msleep, ...) is stuck. That's particularly the case for the cpu looping in __cpu_die() waiting for the dying cpu to be dead. This patch addresses this by having the tick_do_timer_cpu handover happen earlier during the CPU_DYING notification. For this, a new clockevent notification type is introduced (CLOCK_EVT_NOTIFY_CPU_DYING) which is triggered in hrtimer_cpu_notify(). Signed-off-by: NSebastien Dugue <sebastien.dugue@bull.net> Cc: <stable@kernel.org> Signed-off-by: NIngo Molnar <mingo@elte.hu>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/rtnetlink.h:328: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/nubus.h:232: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/virtio_net.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/virtio_console.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/virtio_blk.h:21: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/videodev.h:53: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/video_encoder.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/video_decoder.h:7: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/taskstats.h:44: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/synclink.h:209: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warnings: usr/include/linux/sound.h:33: extern's make no sense in userspace usr/include/linux/sound.h:34: extern's make no sense in userspace usr/include/linux/sound.h:35: extern's make no sense in userspace usr/include/linux/sound.h:36: extern's make no sense in userspace usr/include/linux/sound.h:37: extern's make no sense in userspace usr/include/linux/sound.h:39: extern's make no sense in userspace usr/include/linux/sound.h:40: extern's make no sense in userspace usr/include/linux/sound.h:41: extern's make no sense in userspace usr/include/linux/sound.h:42: extern's make no sense in userspace Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/signalfd.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/random.h:39: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-
由 Jaswinder Singh Rajput 提交于
fix the following 'make headers_check' warning: usr/include/linux/ppp_defs.h:50: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
-