Tejun Heo [Sun, 12 Mar 2006 16:57:01 +0000 (01:57 +0900)]
[PATCH] libata: fix class handling in ata_bus_probe()
ata_bus_probe() didn't set classes[] properly for port disabled case
of ->phy_reset() compatibility path. This patch moves classes[]
initialization and normalization out of ->probe_reset block such that
it applies to both ->probe_reset and ->phy_reset paths.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 12 Mar 2006 02:25:27 +0000 (11:25 +0900)]
[PATCH] ahci: enable prefetching for PACKET commands
Turn on AHCI_CMD_PREFETCH for PACKET commands. This hints the
controller that it can prefetch the CDB and the PRD entries. This
patch is originally from Jeff Garzik.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Garzik [Sun, 12 Mar 2006 01:50:08 +0000 (20:50 -0500)]
libata: turn on ATAPI by default
Jeff Garzik [Sun, 12 Mar 2006 00:55:37 +0000 (19:55 -0500)]
Merge branch 'upstream-fixes'
Jeff Garzik [Sun, 12 Mar 2006 00:55:26 +0000 (19:55 -0500)]
Merge branch 'master'
Tejun Heo [Sat, 11 Mar 2006 02:44:08 +0000 (11:44 +0900)]
[PATCH] sata_sil24: lengthen softreset timeout
sil24 softreset timeout was > 100ms (100 loops with msleep(1)), which
turned out to be too short for some devices (ASI ARAID99 2000). This
patch converts sil24 softreset waiting loop to use proper timeout
condition and lengthen the timeout to ATA_TMOUT_BOOT secs and check
interval to 100ms. Chisato Yamauchi discovered the problem and
supplied initial patch.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Chisato Yamauchi <cyamauch@plamo.linet.gr.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sat, 11 Mar 2006 02:42:34 +0000 (11:42 +0900)]
[PATCH] sata_sil24: exit early from softreset if SStatus reports no device
sata_sil24 softreset routine used to check sata_dev_present() after
SRST is complete in the hope that SRST may do some good even when
SStatus reports no device. This is okay as long as SRST timeout is
short (> 100ms in the current code) but it seems that not all SATA
devices are happy with short SRST timeout.
This patch makes softreset exit early without performing actual SRST
if SStatus reports no device in preparation for lengthening SRST
timeout.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Garzik [Sun, 12 Mar 2006 00:10:06 +0000 (19:10 -0500)]
Merge branch 'upstream-fixes'
Tejun Heo [Sat, 11 Mar 2006 03:47:54 +0000 (12:47 +0900)]
[PATCH] ahci: fix NULL pointer dereference detected by Coverity
Fix NULL pointer dereference detected by the Coverity checker. Kill
dev -> pdev -> dev conversion while at it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sat, 11 Mar 2006 15:57:39 +0000 (00:57 +0900)]
[PATCH] libata: fix missing classes[] initialization in ata_bus_probe()
ata_bus_probe() didn't initialize classes[] properly with
ATA_DEV_UNKNOWN. As ->probe_reset() is allowed to leave @classes
alone when no device is present, this results in garbage class values.
ATM, the only affected driver is ata_piix.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 19:31:57 +0000 (04:31 +0900)]
[PATCH] libata: kill unused xfer_mode functions
Preceding xfer_mask changes make the following functions unused.
ata_pio_modes(), base_from_shift(), ata_pr_blacklisted(), fgb()
Kill them. Also, as xfer_mode_str[] is now only used by
ata_mode_string(), move it into the function.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 19:31:57 +0000 (04:31 +0900)]
[PATCH] libata: reimplement ata_set_mode() using xfer_mask helpers
Use xfer_mask helpers to determine transfer mode. This rewrite also
makes transfer mode determination done before any actual
configuration. This patch doesn't result in any functional changes.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 19:31:57 +0000 (04:31 +0900)]
[PATCH] libata: use xfer_mask helpers in ata_dev_set_mode()
Rewrite hardcoded xfer_mode string determination in ata_dev_set_mode()
using xfer_mask helpers.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 19:31:56 +0000 (04:31 +0900)]
[PATCH] libata: use ata_id_xfermask() in ata_dev_configure()
Replace quick & dirty max transfer mode determination in
ata_dev_configure() with ata_id_xfermask(). While at it, rename
xfer_modes variable to xfer_mask and make it unsigned int for
consistency.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 19:31:56 +0000 (04:31 +0900)]
[PATCH] libata: add xfer_mask handling functions
Add ata_pack_xfermask(), ata_xfer_mask2mode(), ata_xfer_mode2mask(),
ata_xfer_mode2shift() and ata_id_xfermask(). These functions will be
used by following patches to simplify xfer_mask handling.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 19:31:56 +0000 (04:31 +0900)]
[PATCH] libata: improve xfer mask constants and update ata_mode_string()
Add ATA_BITS_*, ATA_MASK_* macros and reorder xfer_mask fields such
that higher transfer mode is placed at higher order bit. As thie
reordering breaks ata_mode_string(), this patch also rewrites
ata_mode_string().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 06:29:09 +0000 (15:29 +0900)]
[PATCH] libata: rename ATA_FLAG_FLUSH_PIO_TASK to ATA_FLAG_FLUSH_PORT_TASK
Rename ATA_FLAG_FLUSH_PIO_TASK to ATA_FLAG_FLUSH_PORT_TASK.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 06:29:09 +0000 (15:29 +0900)]
[PATCH] libata: kill unused pio_task and packet_task
Kill unused pio_task and packet_task.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 06:29:09 +0000 (15:29 +0900)]
[PATCH] libata: convert pio_task and packet_task to port_task
Make pio_task and atapi_packet_task use port_task.
atapi_packet_task() is moved upward such that it's right after
ata_pio_task(). This position is more natural and makes adding
prototype for ata_qc_issue_prot() unnecessary.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sun, 5 Mar 2006 06:29:09 +0000 (15:29 +0900)]
[PATCH] libata: implement port_task
Implement port_task. LLDD's can schedule a function to be executed
with context after specified delay. libata core takes care of
synchronization against EH. This is generalized form of pio_task and
packet_task which are tied to PIO hsm implementation.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Garzik [Sat, 11 Mar 2006 22:47:20 +0000 (17:47 -0500)]
Merge branch 'master'
Linus Torvalds [Sat, 11 Mar 2006 22:12:55 +0000 (14:12 -0800)]
Linux 2.6.16-rc6
Gaah. Delayed. But all the better for it!
Andrew Morton [Wed, 8 Mar 2006 08:06:27 +0000 (00:06 -0800)]
[PATCH] 3c509: bus registration fix
- Don't call eisa_driver_unregister() if eisa_driver_register() failed.
- Properly propagate error values.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Sam Ravnborg [Wed, 8 Mar 2006 08:06:33 +0000 (00:06 -0800)]
[PATCH] de620: fix section mismatch warning
In latest -mm de620 gave following warning:
WARNING: drivers/net/de620.o - Section mismatch: reference to \
.init.text:de620_probe from .text between 'init_module' (at offset \
0x1682) and 'cleanup_module'
init_module() call de620_probe() which is declared __init.
Fix is to declare init_module() __init too.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jesper Juhl [Wed, 8 Mar 2006 08:06:31 +0000 (00:06 -0800)]
[PATCH] NE2000 Kconfig help entry improvement
Improve reference to PCI NE2K support in ISA NE2K documentation.
Original 2.4 patch From: Ged Haywood <ged@jubileegroup.co.uk>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jon Mason [Fri, 10 Mar 2006 21:12:10 +0000 (15:12 -0600)]
[PATCH] dl2k: DMA freeing error
This patch fixes an error in the dl2k driver's DMA mapping/unmapping.
The adapter uses the upper 16bits of the DMA address for the buffer
size. However, this is not masked off when referencing the DMA
address, and can lead to errors by trying to free a DMA address out of
range.
Thanks,
Jon
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
David S. Miller [Sat, 11 Mar 2006 02:08:09 +0000 (18:08 -0800)]
[PATCH] Wrong return value corrupts free object in e1000 driver
For some reason, E1000's ->hard_start_xmit() routine returns -EFAULT
instead of one of the NETDEV_TX_* error codes. In fact, it frees up
the SKB before returning this. This makes the queueing layer think
the packet should be requeued and subsequently we corrupt a freed
object.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Garzik [Sat, 11 Mar 2006 18:23:48 +0000 (13:23 -0500)]
Merge branch 'for-jeff' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:28 +0000 (03:27 -0800)]
[PATCH] radeonfb: Fix static array overrun
radeonfb_parse_monitor_layout() will produce an array overrun if passed with a
substring of length higher than 4 (ie, "XXXXX,YYYYYY").
Coverity Bug 494
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:27 +0000 (03:27 -0800)]
[PATCH] aty128fb: Fix array overrun
Fix static array overrun
Coverity Bug 556
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:26 +0000 (03:27 -0800)]
[PATCH] tdfxfb: Fix buffer overrun
The pseudo_palette has room only for 16 entries, but tdfxfb_setcolreg may
attempt to write more.
Coverity Bug 557
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:26 +0000 (03:27 -0800)]
[PATCH] intelfb: Fix buffer overrun
The pseudo_palette has room only for 16 entries, but intelfb_setcolreg will
attempt to write more.
Coverity Bug 558
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:25 +0000 (03:27 -0800)]
[PATCH] savagefb: Fix kfree before use
par->edid is kfree'd before using in fb_edid_to_monspecs()
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:24 +0000 (03:27 -0800)]
[PATCH] imsttfb: Fix resource leak
The struct info and device resource may not be released in the driver's error
path. Fix.
Coverity Bug 671
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:23 +0000 (03:27 -0800)]
[PATCH] s1d13xxxfb: Fix resource leak
struct info may not be released in the driver's error path.
Coverity Bug 672
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:23 +0000 (03:27 -0800)]
[PATCH] arcfb: Fix dereference before NULL check
info->par is dereferenced before info is checked for NULL. Fix.
Coverity Bug 833
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:22 +0000 (03:27 -0800)]
[PATCH] kyrofb: Fix uninitialized value
Initialize Variable 'count' in DisableVGA to zero.
Coverity Bug 874
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:21 +0000 (03:27 -0800)]
[PATCH] arcfb: Fix uninitialized value
Remove insignificant and uninitialized variable "count" from
arcfb_lcd_update_page.
Coverity Bug 894
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas [Sat, 11 Mar 2006 11:27:20 +0000 (03:27 -0800)]
[PATCH] neofb: Fix uninitialized value
Remove insignificant and unitialized variable "waitcycles" from neo2200_sync.
Coverity Bug 895
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chris Wright [Sat, 11 Mar 2006 11:27:20 +0000 (03:27 -0800)]
[PATCH] LSM mail list has moved
LSM mail list has moved.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chris Wright [Sat, 11 Mar 2006 11:27:19 +0000 (03:27 -0800)]
[PATCH] update email address
Update email address.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christoph Hellwig [Sat, 11 Mar 2006 11:27:18 +0000 (03:27 -0800)]
[PATCH] remove __put_task_struct_cb export again
The patch '[PATCH] RCU signal handling' [1] added an export for
__put_task_struct_cb, a put_task_struct helper newly introduced in that
patch. But the put_task_struct couldn't be used modular previously as
__put_task_struct wasn't exported. There are not callers of it in modular
code, and it shouldn't be exported because we don't want drivers to hold
references to task_structs.
This patch removes the export and folds __put_task_struct into
__put_task_struct_cb as there's no other caller.
[1] http://www2.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=
e56d090310d7625ecb43a1eeebd479f04affb48b
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Pat Gefre [Sat, 11 Mar 2006 11:27:17 +0000 (03:27 -0800)]
[PATCH] Altix: small ioc4 oversight
Get rid of the local 'flip' variable and no need to 'trim' the buffer.
Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stephen Smalley [Sat, 11 Mar 2006 11:27:16 +0000 (03:27 -0800)]
[PATCH] selinux: tracer SID fix
Fix SELinux to not reset the tracer SID when the child is already being
traced, since selinux_ptrace is also called by proc for access checking
outside of the context of a ptrace attach.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Arjan van de Ven [Sat, 11 Mar 2006 11:27:15 +0000 (03:27 -0800)]
[PATCH] edac: disable a few sysfs files to avoid them becoming an ABI
Disable (via ugly #if 0's) the 3 sysfs files that I think by now we all
agree are very much wrong. These files shouldn't become part of the ABI by
the 2.6.16 release, so I rather have this minimal patch merged to disable
them for now, the real fix can then come during the 2.6.17 devel window.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Badari Pulavarty [Sat, 11 Mar 2006 11:27:14 +0000 (03:27 -0800)]
[PATCH] ext3: fix nobh mode for chattr +j inodes
One can do "chattr +j" on a file to change its journalling mode. Fix
writeback mode with "nobh" handling for it.
Even though, we mount ext3 filesystem in writeback mode with "nobh" option,
some one can do "chattr +j" on a single file to force it to do journalled
mode. In order to do journaling, ext3_block_truncate_page() need to
fallback to default case of creating buffers and adding them to transaction
etc.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kirill Korotaev [Sat, 11 Mar 2006 11:27:13 +0000 (03:27 -0800)]
[PATCH] ext3: ext3_symlink should use GFP_NOFS allocations inside
This patch fixes illegal __GFP_FS allocation inside ext3 transaction in
ext3_symlink(). Such allocation may re-enter ext3 code from
try_to_free_pages. But JBD/ext3 code keeps a pointer to current journal
handle in task_struct and, hence, is not reentrable.
This bug led to "Assertion failure in journal_dirty_metadata()" messages.
http://bugzilla.openvz.org/show_bug.cgi?id=115
Signed-off-by: Andrey Savochkin <saw@saw.sw.com.sg>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dmitry Torokhov [Sat, 11 Mar 2006 05:23:38 +0000 (00:23 -0500)]
[PATCH] Input: psmouse - disable autoresync
Automatic resynchronization in psmouse driver causes problems on some
hardware so disable it by default for now. People with KVM switches
that require resync can still enable it via module parameter or sysfs
attribute.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Sat, 11 Mar 2006 00:39:03 +0000 (16:39 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Fix race in the accessed/dirty bit handlers
Jan Beulich [Wed, 22 Feb 2006 12:29:04 +0000 (13:29 +0100)]
[PATCH] kbuild: version.h should depend on .kernelrelease
Rebuilding a previously built tree while using make's -j option from
time to time results in the version.h check running at the same time as
the updating of .kernelrelease, resulting in UTS_RELEASE remaining an
empty string (and as a side effect causing the entire kernel to be
rebuilt).
Signed-Off-By: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hugh Dickins [Fri, 10 Mar 2006 21:13:44 +0000 (21:13 +0000)]
[PATCH] fix pcmcia_device_probe oops
Fix pcmcia_device_probe NULL pointer dereference at startup.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christoph Lameter [Fri, 10 Mar 2006 01:33:54 +0000 (17:33 -0800)]
[PATCH] slab: Node rotor for freeing alien caches and remote per cpu pages.
The cache reaper currently tries to free all alien caches and all remote
per cpu pages in each pass of cache_reap. For a machines with large number
of nodes (such as Altix) this may lead to sporadic delays of around ~10ms.
Interrupts are disabled while reclaiming creating unacceptable delays.
This patch changes that behavior by adding a per cpu reap_node variable.
Instead of attempting to free all caches, we free only one alien cache and
the per cpu pages from one remote node. That reduces the time spend in
cache_reap. However, doing so will lengthen the time it takes to
completely drain all remote per cpu pagesets and all alien caches. The
time needed will grow with the number of nodes in the system. All caches
are drained when they overflow their respective capacity. So the drawback
here is only that a bit of memory may be wasted for awhile longer.
Details:
1. Rename drain_remote_pages to drain_node_pages to allow the specification
of the node to drain of pcp pages.
2. Add additional functions init_reap_node, next_reap_node for NUMA
that manage a per cpu reap_node counter.
3. Add a reap_alien function that reaps only from the current reap_node.
For us this seems to be a critical issue. Holdoffs of an average of ~7ms
cause some HPC benchmarks to slow down significantly. F.e. NAS parallel
slows down dramatically. NAS parallel has a 12-16 seconds runtime w/o rotor
compared to 5.8 secs with the rotor patches. It gets down to 5.05 secs with
the additional interrupt holdoff reductions.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Roman Zippel [Fri, 10 Mar 2006 01:33:53 +0000 (17:33 -0800)]
[PATCH] m68k: fix cmpxchg compile errors if CONFIG_RMW_INSNS=n
We require that all archs implement atomic_cmpxchg(), for the generic
version of atomic_add_unless().
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Horst Hummel [Fri, 10 Mar 2006 01:33:52 +0000 (17:33 -0800)]
[PATCH] s390: dasd proc interface typo
This fixes a typo introduced with
90f0094dc607abe384a412bfb7199fb667ab0735.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Yasunori Goto [Fri, 10 Mar 2006 01:33:51 +0000 (17:33 -0800)]
[PATCH] memory hotadd: pgdat->node_present_pages fix
When pages are onlined, not only zone->present_pages but also
pgdat->node_present_pages should be refreshed.
This parameter is used to show information at
/sys/device/system/node/nodeX/meminfo via si_meminfo_node().
So, it shows strange value for MemUsed which is calculated
(node_present_pages - all zones free pages).
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tim Small [Fri, 10 Mar 2006 01:33:50 +0000 (17:33 -0800)]
[PATCH] edac: mark as experimental
EDAC is still causing a few problems and the code is relatively green. Mark
it as experimental until thing settle down.
Also, provide some documentation pointers in Kconfig help.
Signed-off-by: Tim Small <tim@buttersideup.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christian Ehrhardt [Fri, 10 Mar 2006 01:33:49 +0000 (17:33 -0800)]
[PATCH] s390: Increase spinlock retry code performance
Currently the code tries up to spin_retry times to grab a lock using the cs
instruction. The cs instruction has exclusive access to a memory region
and therefore invalidates the appropiate cache line of all other cpus. If
there is contention on a lock this leads to cache line trashing. This can
be avoided if we first check wether a cs instruction is likely to succeed
before the instruction gets actually executed.
Signed-off-by: Christian Ehrhardt <ehrhardt@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Max Asbock [Fri, 10 Mar 2006 01:33:48 +0000 (17:33 -0800)]
[PATCH] ibmasm: use after free fix
The kobject_put() can free the memory at *cmd, but cmd->lock points to a
persistent lock that is not freed with cmd.
Signed-off-by: Max Asbock <masbock@us.ibm.com>
Cc: Vernon Mauery <vernux@us.ibm.com>
Cc: Srihari Vijayaraghavan <sriharivijayaraghavan@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christoph Lameter [Fri, 10 Mar 2006 01:33:47 +0000 (17:33 -0800)]
[PATCH] vmscan: no zone_reclaim if PF_MALLOC is set
If the process has already set PF_MALLOC and is already using
current->reclaim_state then do not try to reclaim memory from the zone.
This is set by kswapd and/or synchrononous global reclaim which will not
take it lightly if we zap the reclaim_state.
Signed-off-by: Christoph Lameter <clameter@sig.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 10 Mar 2006 01:33:46 +0000 (17:33 -0800)]
[PATCH] md: Fix several raid1 bugs which cause a memory leak
- wrong test for 'is this a BARRIER bio'
- not freeing on all possible paths.
- using r1_bio after freeing it.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 10 Mar 2006 01:33:45 +0000 (17:33 -0800)]
[PATCH] xtensa must set RWSEM_GENERIC_SPINLOCK=y
/usr/src/ctest/git/kernel/mm/rmap.c: In function `page_referenced_one':
/usr/src/ctest/git/kernel/mm/rmap.c:354: warning: implicit declaration of function `rwsem_is_locked'
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 10 Mar 2006 01:33:44 +0000 (17:33 -0800)]
[PATCH] arch/sh/Kconfig: don't source non-existing Kconfig files
arch/sh/Kconfig shouldn't source non-existing Kconfig files.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Atsushi Nemoto [Fri, 10 Mar 2006 01:33:38 +0000 (17:33 -0800)]
[PATCH] mtd: 64 bit fixes
Fix some bugs in mtd/jffs2 on 64bit platform.
The MEMGETBADBLOCK/MEMSETBADBLOCK ioctl are not listed in compat_ioctl.h.
And some variables in jffs2 are declared as uint32_t but used to hold
size_t values.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ivan Kokshaysky [Fri, 10 Mar 2006 01:33:37 +0000 (17:33 -0800)]
[PATCH] alpha: fix IRQ handling lockup
Fix a lockup which was introduced during the conversion to the generic IRQ
framework.
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jean Delvare [Fri, 10 Mar 2006 01:33:36 +0000 (17:33 -0800)]
[PATCH] Fix error handling in backlight drivers
ERR_PTR() is supposed to be passed a negative value.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Doug Warzecha [Fri, 10 Mar 2006 01:33:35 +0000 (17:33 -0800)]
[PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit
smi_data_buf_free() references dcdbas_pdev when calling
dma_free_coherent(). In dcdbas_exit(), smi_data_buf_free() is called after
platform_device_unregister(dcdbas_pdev).
This patch moves platform_device_unregister(dcdbas_pdev) after
smi_data_buf_free() in dcdbas_exit().
Signed-off-by: Doug Warzecha <Douglas_Warzecha@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hugh Dickins [Fri, 10 Mar 2006 01:33:34 +0000 (17:33 -0800)]
[PATCH] page_add_file_rmap(): remove BUG_ON()s
Remove two early-development BUG_ONs from page_add_file_rmap.
The pfn_valid test (originally useful for checking that nobody passed an
artificial struct page) comes too late, since we already have the struct
page.
The PageAnon test (useful when anon was first distinguished from file rmap)
prevents ->nopage implementations from reusing ->mapping, which would
otherwise be available.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stephen Hemminger [Tue, 7 Mar 2006 19:06:37 +0000 (11:06 -0800)]
sky2: truncate oversize packets
Turn on truncation to prevent getting choked by frames larger than expected.
Without this fix, driver hangs after receiving an oversize packet.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Stephen Hemminger [Tue, 7 Mar 2006 19:06:36 +0000 (11:06 -0800)]
sky2: force early transmit interrupts
Avoid premature transmit ring full conditions.
Force a transmit status interrupt if transmit ring gets nearly full
and after a TSO send.
Allow more entries in transmit ring to be used if dma_addr is 32 bits
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Stephen Hemminger [Tue, 7 Mar 2006 19:06:35 +0000 (11:06 -0800)]
sky2: not random enough
Don't use sky2 to seed random pool beacause the network packet arrival time
will not be truly random due to NAPI and interrupt mitigation.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Francois Romieu [Wed, 8 Mar 2006 21:45:52 +0000 (22:45 +0100)]
de2104x: fix the TX watchdog
Insert de_init_rings() to reinit the rings before de_init_hw()
tries to access them again.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Francois Romieu [Wed, 8 Mar 2006 21:41:15 +0000 (22:41 +0100)]
de2104x: prevent interrupt before the interrupt handler is registered
de_init_hw enables the irq thus it must be issued after request_irq.
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ralf Baechle [Wed, 8 Mar 2006 17:14:49 +0000 (17:14 +0000)]
[MIPS] Always pass -msoft-float.
Some people still haven't heared that fp in the kernel is forbidden.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 8 Mar 2006 16:04:32 +0000 (16:04 +0000)]
[MIPS] Undefine scr_writew and scr_readw in <asm/vga.h>.
This is gluing the build of cirrusfb but really the mess that would need
cleaning and fixing is <video/vga.h> and <linux/vt_buffer.h> ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 8 Mar 2006 15:37:26 +0000 (15:37 +0000)]
[MIPS] Scatter a bunch of __init over tlbex.c.
Found by make buildcheck.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 8 Mar 2006 14:22:27 +0000 (14:22 +0000)]
[MIPS] Momentum: Resurrect after things were moved around a while ago.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Wed, 8 Mar 2006 14:13:04 +0000 (14:13 +0000)]
[MIPS] Discard .exit.text at runtime.
At times gcc will place bits of __exit functions into .rodata. If
compiled into the kernle itself we used to discard .exit.text - but
not the bits left in .rodata. While harmless this did at times result
in a large number of warnings. So until gcc fixes this, discard
.exit.text at runtime.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Sun, 5 Mar 2006 00:45:33 +0000 (00:45 +0000)]
[MIPS] Enable highmem for all MIPS32 and MIPS64 processors.
In case a particular system doesn't support highmem the runtime checks
will ensure nothing bad is going to happen.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Fri, 3 Mar 2006 17:35:15 +0000 (17:35 +0000)]
[MIPS] A struct console.setup function may not be __init.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Thu, 2 Mar 2006 16:50:12 +0000 (16:50 +0000)]
[MIPS] Threaten removal of code for NEC
DDB5074 and
DDB5476 evaluation boards.
What: Support for NEC
DDB5074 and
DDB5476 evaluation boards.
When: June 2006
Why: Board specific code doesn't build anymore since ~2.6.0 and no
users have complained indicating there is no more need for these
boards. This should really be considered a last call.
Who: Ralf Baechle <ralf@linux-mips.org>
Linus Torvalds [Thu, 9 Mar 2006 02:11:00 +0000 (18:11 -0800)]
Merge git://git./linux/kernel/git/paulus/powerpc-merge
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge:
powerpc: Fix various syscall/signal/swapcontext bugs
[PATCH] powerpc: incorrect rmo_top handling in prom_init
[PATCH] powerpc: Fix incorrect pud_ERROR() message
[PATCH] powerpc: Expose SMT and L1 icache snoop userland features
[PATCH] powerpc: Fix windfarm_pm112 not starting all control loops
[PATCH] powerpc: Fix old g5 issues with windfarm
powerpc32: Fix timebase synchronization on 32-bit powermacs
powerpc: Turn off verbose debug output in powermac platform functions
powerpc: Fix might-sleep warning in program check exception handler
Andi Kleen [Thu, 9 Mar 2006 01:57:26 +0000 (17:57 -0800)]
[PATCH] block: disable block layer bouncing for most memory on 64bit systems
The low level PCI DMA mapping functions should handle it in most cases.
This should fix problems with depleting the DMA zone early. The old
code used precious GFP_DMA memory in many cases where it was not needed.
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Thu, 9 Mar 2006 01:57:25 +0000 (17:57 -0800)]
[PATCH] i386: port ATI timer fix from x86_64 to i386 II
ATI chipsets tend to generate double timer interrupts for the local APIC
timer when both the 8254 and the IO-APIC timer pins are enabled. This is
because they route it to both and the result is anded together and the CPU
ends up processing it twice.
This patch changes check_timer to disable the 8254 routing for interrupt 0.
I think it would be safe on all chipsets actually (i tested it on a couple
and it worked everywhere) and Windows seems to do it in a similar way, but
to be conservative this patch only enables this mode on ATI (and adds
options to enable/disable too)
Ported over from a similar x86-64 change.
I reused the ACPI earlyquirk infrastructure for the ATI bridge check, but
tweaked it a bit to work even without ACPI.
Inspired by a patch from Chuck Ebbert, but redone.
Cc: Chuck Ebbert <76306.1226@compuserve.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Thu, 9 Mar 2006 01:50:14 +0000 (17:50 -0800)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NET] compat ifconf: fix limits
Linus Torvalds [Thu, 9 Mar 2006 00:59:34 +0000 (16:59 -0800)]
Merge /pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
Merge branch 'work-fixes'
V4L/DVB (3413): Typos grab bag of the month
V4L/DVB (3403): Workaround to fix initialization for Nexus CA
Merge branch 'work-fixes'
V4L/DVB (3395): Fixed Pinnacle 300i DVB-T support
V4L/DVB (3399): ELSA EX-VISION 500TV: fix incorrect PCI subsystem ID
V4L/DVB (3382): Fix stv0297 for qam128 on tt c1500 (saa7146)
V4L/DVB (3300a): Removing personal email from DVB maintainers
V4L/DVB (3385): Dvb: fix __init/__exit section references in av7110 driver
V4L/DVB (3378): Restore power on defaults of tda9887 after tda8290 probe
V4L/DVB (3354): Fix maximum for the saturation and contrast controls.
V4L/DVB (3352): Cxusb: fix lgdt3303 naming
V4L/DVB (3348): Fixed saa7134 ALSA initialization with multiple cards
V4L/DVB (3347): Pinnacle PCTV 40i: add filtered Composite2 input
V4L/DVB (3341): Upstream sync - make 2 structs static
V4L/DVB (3340): Make a struct static
V4L/DVB (3337): Drivers/media/dvb/frontends/mt312.c: cleanups
V4L/DVB (3336): Bt8xx documentation authors fix
Randy Dunlap [Thu, 9 Mar 2006 00:46:08 +0000 (16:46 -0800)]
[NET] compat ifconf: fix limits
A recent change to compat. dev_ifconf() in fs/compat_ioctl.c
causes ifconf data to be truncated 1 entry too early when copying it
to userspace. The correct amount of data (length) is returned,
but the final entry is empty (zero, not filled in).
The for-loop 'i' check should use <= to allow the final struct
ifreq32 to be copied. I also used the ifconf-corruption program
in kernel bugzilla #4746 to make sure that this change does not
re-introduce the corruption.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Christoph Lameter [Wed, 8 Mar 2006 03:05:32 +0000 (19:05 -0800)]
[IA64] Fix race in the accessed/dirty bit handlers
A pte may be zapped by the swapper, exiting process, unmapping or page
migration while the accessed or dirty bit handers are about to run. In that
case the accessed bit or dirty is set on an zeroed pte which leads the VM to
conclude that this is a swap pte. This may lead to
- Messages from the vm like
swap_free: Bad swap file entry
4000000000000000
- Processes being aborted
swap_dup: Bad swap file entry
4000000000000000
VM: killing process ....
Page migration is particular suitable for the creation of this race since
it needs to remove and restore page table entries.
The fix here is to check for the present bit and simply not update
the pte if the page is not present anymore. If the page is not present
then the fault handler should run next which will take care of the problem
by bringing the page back and then mark the page dirty or move it onto the
active list.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Michael Matz [Wed, 8 Mar 2006 05:55:48 +0000 (21:55 -0800)]
[PATCH] fix kexec asm
While testing kexec and kdump we hit problems where the new kernel would
freeze or instantly reboot. The easiest way to trigger it was to kexec a
kernel compiled for CONFIG_M586 on an athlon cpu. Compiling for CONFIG_MK7
instead would work fine.
The patch fixes a few problems with the kexec inline asm.
Signed-off-by: Chris Mason <mason@suse.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matt Mackall [Wed, 8 Mar 2006 05:55:47 +0000 (21:55 -0800)]
[PATCH] dac960: add disk entropy in request completions
Signed-off-by: Matt Mackall <mpm@selenic.com>
Tested-by: Anders K. Pedersen <akp@cohaesio.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jack Steiner [Wed, 8 Mar 2006 05:55:46 +0000 (21:55 -0800)]
[PATCH] slab: allocate larger cache_cache if order 0 fails
kmem_cache_init() incorrectly assumes that the cache_cache object will fit
in an order 0 allocation. On very large systems, this is not true. Change
the code to try larger order allocations if order 0 fails.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Latchesar Ionkov [Wed, 8 Mar 2006 05:55:42 +0000 (21:55 -0800)]
[PATCH] v9fs: fix for access to unitialized variables or freed memory
Miscellaneous fixes related to accessing uninitialized variables or memory
that was already freed.
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Shaohua Li [Wed, 8 Mar 2006 05:55:40 +0000 (21:55 -0800)]
[PATCH] x86: cpu model calculation for family 6 cpu
The x86_model calculation also applies for family 6. early_cpu_detect
does the right thing, but generic_identify misses.
Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Horst Hummel [Wed, 8 Mar 2006 05:55:39 +0000 (21:55 -0800)]
[PATCH] s390: dasd partition detection
DASD allows to open a device as soon as gendisk is registered, which means the
device is a fake device (capacity=0) and we do know nothing about blocksize
and partitions at that point of time. In case the device is opened by
someone, the bdev and inode creation is done with the fake device info and the
following partition detection code is just using the wrong data.
To avoid this modify the DASD state machine to make sure that the open is
rejected until the device analysis is either finished or an unformatted device
was detected.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Martin Schwidefsky [Wed, 8 Mar 2006 05:55:38 +0000 (21:55 -0800)]
[PATCH] s390: iucv message limit for smsg
The message limit on the iucv connect call for the smsg module is too low.
Therefore increase the smsg message limit to 255.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerald Schaefer [Wed, 8 Mar 2006 05:55:37 +0000 (21:55 -0800)]
[PATCH] s390: fix strnlen_user return value
strnlen_user is supposed to return then length count + 1 if no terminating \0
is found, and it should return 0 on exception. Found by David Howells
<dhowells@redhat.com>.
Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Woodhouse [Wed, 8 Mar 2006 05:55:36 +0000 (21:55 -0800)]
[PATCH] jffs2: avoid divide-by-zero
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dipankar Sarma [Wed, 8 Mar 2006 05:55:35 +0000 (21:55 -0800)]
[PATCH] fix file counting
I have benchmarked this on an x86_64 NUMA system and see no significant
performance difference on kernbench. Tested on both x86_64 and powerpc.
The way we do file struct accounting is not very suitable for batched
freeing. For scalability reasons, file accounting was
constructor/destructor based. This meant that nr_files was decremented
only when the object was removed from the slab cache. This is susceptible
to slab fragmentation. With RCU based file structure, consequent batched
freeing and a test program like Serge's, we just speed this up and end up
with a very fragmented slab -
llm22:~ # cat /proc/sys/fs/file-nr
587730 0 758844
At the same time, I see only a 2000+ objects in filp cache. The following
patch I fixes this problem.
This patch changes the file counting by removing the filp_count_lock.
Instead we use a separate percpu counter, nr_files, for now and all
accesses to it are through get_nr_files() api. In the sysctl handler for
nr_files, we populate files_stat.nr_files before returning to user.
Counting files as an when they are created and destroyed (as opposed to
inside slab) allows us to correctly count open files with RCU.
Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dipankar Sarma [Wed, 8 Mar 2006 05:55:33 +0000 (21:55 -0800)]
[PATCH] rcu batch tuning
This patch adds new tunables for RCU queue and finished batches. There are
two types of controls - number of completed RCU updates invoked in a batch
(blimit) and monitoring for high rate of incoming RCUs on a cpu (qhimark,
qlowmark).
By default, the per-cpu batch limit is set to a small value. If the input
RCU rate exceeds the high watermark, we do two things - force quiescent
state on all cpus and set the batch limit of the CPU to INTMAX. Setting
batch limit to INTMAX forces all finished RCUs to be processed in one shot.
If we have more than INTMAX RCUs queued up, then we have bigger problems
anyway. Once the incoming queued RCUs fall below the low watermark, the
batch limit is set to the default.
Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 8 Mar 2006 05:55:31 +0000 (21:55 -0800)]
[PATCH] percpu_counter_sum()
Implement percpu_counter_sum(). This is a more accurate but slower version of
percpu_counter_read_positive().
We need this for Alex's speedup-ext3_statfs patch and for the nr_file
accounting fix. Otherwise these things would be too inaccurate on large CPU
counts.
Cc: Ravikiran G Thirumalai <kiran@scalex86.org>
Cc: Alex Tomas <alex@clusterfs.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
GOTO Masanori [Wed, 8 Mar 2006 05:55:29 +0000 (21:55 -0800)]
[PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi
Fix i386 nmi_watchdog that does not meet watchdog timeout condition. It
does not hit die_nmi when it should be triggered, because the current
nmi_watchdog_tick in arch/i386/kernel/nmi.c never count up alert_counter
like this:
void nmi_watchdog_tick (struct pt_regs * regs) {
if (last_irq_sums[cpu] == sum) {
alert_counter[cpu]++; <- count up alert_counter, but
if (alert_counter[cpu] == 5*nmi_hz)
die_nmi(regs, "NMI Watchdog detected LOCKUP");
alert_counter[cpu] = 0; <- reset alert_counter
This patch changes it back to the previous and working version.
This was found and originally written by Kohta NAKASHIMA.
(akpm: also uninline write_watchdog_counter(), saving 184 byets)
Signed-off-by: GOTO Masanori <gotom@sanori.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>