aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-29Merge branch 'kprobes' of git://git.linaro.org/people/nico/linux into fixesRussell King3-321/+462
2011-04-29hrtimer: Initialize CLOCK_ID to HRTIMER_BASE table staticallyThomas Gleixner1-5/+5
Sedat and Bruno reported RCU stalls which turned out to be caused by the following; sched_init() calls init_rt_bandwidth() which calls hrtimer_init() _BEFORE_ hrtimers_init() is called. While not entirely correct this worked because hrtimer_init() only accessed statically initialized data (hrtimer_bases.clock_base[CLOCK_MONOTONIC]) Commit e06383db9 (hrtimers: extend hrtimer base code to handle more then 2 clockids) added an indirection to the hrtimer_bases.clock_base lookup to avoid gap handling in the hot path. The table which is used for the translataion from CLOCK_ID to HRTIMER_BASE index is initialized at runtime in hrtimers_init(). So the early call of the scheduler code translates CLOCK_MONOTONIC to HRTIMER_BASE_REALTIME. Thus the rt_bandwith timer ends up on CLOCK_REALTIME. If the timer is armed and the wall clock time is set (e.g. ntpdate in the early boot process - which also gives the problem deterministic behaviour i.e. magic recovery after N hours), then the timer ends up with an expiry time far into the future. That breaks the RT throttler mechanism as rt runtime is accumulated and never cleared, so the rt throttler detects a false cpu hog condition and blocks all RT tasks until the timer finally expires. That in turn stalls the RCU thread of TINYRCU which leads to an huge amount of RCU callbacks piling up. Make the translation table statically initialized, so we are back to the status of <= 2.6.39. Reported-and-tested-by: Sedat Dilek <[email protected]> Reported-by: Bruno Prémont <[email protected]> Cc: John stultz <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/%3Calpine.LFD.2.02.1104282353140.3005%40ionos%3E Reviewed-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2011-04-29[S390] irqstats: fix counting of pfault, dasd diag and virtio irqsHeiko Carstens3-3/+3
pfault, dasd diag and virtio all use the same external interrupt number. The respective interrupt handlers decide by the subcode if they are meant to handle the interrupt. Counting is currently done before looking at the subcode which means each handler counts an interrupt even if it is not handling it. Fix this by moving the kstat code after the code which looks at the subcode. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-04-29ALSA: hda: add beep quirk for Realtek 0x1043:831aDaniel Cordero1-0/+1
PC Beep was not being reported as enabled on my EeePC 901: SKU: enable_pcbeep=0x0 Signed-off-by: Daniel Cordero <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2011-04-29cifs: sanitize length checking in coalesce_t2 (try #3)Jeff Layton1-6/+16
There are a couple of places in this code where these values can wrap or go negative, and that could potentially end up overflowing the buffer. Ensure that that doesn't happen. Do all of the length calculation and checks first, and only perform the memcpy after they pass. Also, increase some stack variables to 32 bits to ensure that they don't wrap without being detected. Finally, change the error codes to be a bit more descriptive of any problems detected. -EINVAL isn't very accurate. Cc: [email protected] Reported-and-Acked-by: David Howells <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-04-29cifs: check for bytes_remaining going to zero in CIFS_SessSetupJeff Layton1-1/+3
It's possible that when we go to decode the string area in the SESSION_SETUP response, that bytes_remaining will be 0. Decrementing it at that point will mean that it can go "negative" and wrap. Check for a bytes_remaining value of 0, and don't try to decode the string area if that's the case. Cc: [email protected] Reported-and-Acked-by: David Howells <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-04-29cifs: change bleft in decode_unicode_ssetup back to signed typeJeff Layton1-14/+1
The buffer length checks in this function depend on this value being a signed data type, but 690c522fa converted it to an unsigned type. Also, eliminate a problem with the null termination check in the same function. cifs_strndup_from_ucs handles that situation correctly already, and the existing check could potentially lead to a buffer overrun since it increments bleft without checking to see whether it falls off the end of the buffer. Cc: [email protected] Reported-and-Acked-by: David Howells <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-04-28ARM: kprobes: Tidy-up kprobes-decode.cJon Medhurst1-108/+23
- Remove coding standard violations reported by checkpatch.pl - Delete comment about handling of conditional branches which is no longer true. - Delete comment at end of file which lists all ARM instructions. This duplicates data available in the ARM ARM and seems like an unnecessary maintenance burden to keep this up to date and accurate. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Add emulation of hint instructions like NOP and WFIJon Medhurst1-0/+24
Being able to probe NOP instructions is useful for hard-coding probeable locations and is used by the kprobes test code. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Add emulation of SBFX, UBFX, BFI and BFC instructionsJon Medhurst1-0/+42
These bit field manipulation instructions occur several thousand times in an ARMv7 kernel. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Add emulation of MOVW and MOVT instructionsJon Medhurst1-2/+28
The MOVW and MOVT instructions account for approximately 7% of all instructions in a ARMv7 kernel as GCC uses them instead of a literal pool. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of undefined data processing instructionsJon Medhurst1-14/+17
The instruction decoding in space_cccc_000x needs to reject probing of instructions with undefined patterns as they may in future become defined and then emulated faultily - as has already happened with the SMC instruction. This fix is achieved by testing for the instruction patterns we want to probe and making the the default fall-through paths reject probes. This also allows us to remove some explicit tests for instructions that we wish to reject, as that is now the default action. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Remove redundant code in space_1111Jon Medhurst1-9/+5
The tests to explicitly reject probing CPS, RFE and SRS instructions are redundant as the default case is now to reject undecoded patterns. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of PLD instructionsJon Medhurst1-13/+8
The PLD instructions wasn't being decoded correctly and the emulation code wasn't adjusting PC correctly. As the PLD instruction is only a performance hint we emulate it as a simple nop, and we can broaden the instruction decoding to take into account newer PLI and PLDW instructions. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of SETEND instructionsJon Medhurst1-5/+0
The emulation of SETEND was broken as it changed the endianess for the running kprobes handling code. Rather than adding a new simulation routine to fix this we'll just reject probing of SETEND as these should be very rare in the kernel. Note, the function emulate_none is now unused but it is left in the source code as future patches will use it. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Consolidate stub decoding functionsJon Medhurst1-31/+9
Following the change to remove support for coprocessor instructions we are left with three stub functions which can be consolidated. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of all coprocessor instructionsJon Medhurst1-102/+11
The kernel doesn't currently support VFP or Neon code, and probing of code with CP15 operations is fraught with bad consequences. Therefore we don't need the ability to probe coprocessor instructions and the code to support this can be removed. The removed code also had at least two bugs: - MRC into R15 should set CPSR not trash PC - LDC and STC which use PC as base register needed the address offset by 8 Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of USAD8 instructionsJon Medhurst1-6/+4
The USAD8 instruction wasn't being explicitly decoded leading to the incorrect emulation routine being called. It can be correctly decoded in the same way as the signed multiply instructions so we move the decoding there. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of SMUAD, SMUSD and SMMUL instructionsJon Medhurst1-7/+15
The signed multiply instructions were being decoded incorrectly. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of SXTB16, SXTB, SXTH, UXTB16, UXTB and UXTH ↵Jon Medhurst1-2/+12
instructions These sign extension instructions are encoded as extend-and-add instructions where the register to add is specified as r15. The decoding routines weren't checking for this and were using the incorrect emulation code, giving incorrect results. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of undefined media instructionsJon Medhurst1-1/+35
The instructions space for media instructions contains some undefined patterns. We need to reject probing of these because they may in future become defined and the kprobes code may then emulate them faultily. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Add emulation of RBIT instructionJon Medhurst1-1/+2
The v6T2 RBIT instruction was accidentally being emulated correctly, this patch adds correct decoding for the instruction. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of LDRB instructions which load PCJon Medhurst1-0/+4
These instructions are specified as UNPREDICTABLE. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of LDRD and STRD instructionsJon Medhurst1-6/+6
The decoding of these instructions got the register indexed and immediate indexed forms the wrong way around, causing incorrect emulation. Instructions like "LDRD Rx, [Rx]" were corrupting Rx because the base register writeback was being performed unconditionally, overwriting the value just loaded from memory. The fix is to only writeback the base register when that form of the instruction is used. Note, now that we reject probing writeback with PC the emulation code doesn't need the check rn!=15. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of LDR/STR instructions which update PC ↵Jon Medhurst1-0/+17
unpredictably Using PC as an base register with writeback is UNPREDICTABLE, as is non word-sized loads or stores of PC. (We only really care about preventing loads to PC but it keeps the code simpler if we also exclude stores.) Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of LDRH, STRH, LDRSB and LDRSH instructionsJon Medhurst1-2/+3
The decoding of these instructions got the register indexed and immediate indexed forms the wrong way around, causing incorrect emulation. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of STREX and LDREX instructionsJon Medhurst1-5/+22
The emulation code for STREX and LDREX instructions is faulty, however, rather than attempting to fix this we reject probes of these instructions. We do this because they can never succeed in gaining exclusive access as the exception framework clears the exclusivity monitor when a probes breakpoint is hit. (This is a general problem when probing all instructions executing between a LDREX and its corresponding STREX and can lead to infinite retry loops.) Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of undefined multiply instructionsJon Medhurst1-3/+8
The instructions space for 'Multiply and multiply-accumulate' instructions contains some undefined patterns. We need to reject probing of these because they may in future become defined and the kprobes code may then emulate them faultily. This has already happened with the new MLS instruction which this patch also adds correct decoding for as well as tightening up other decoding tests. (Before this patch the wrong emulation routine was being called for MLS though it still produced correct results.) Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix error in commentJon Medhurst1-1/+1
Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing of instructions which write to PC unpredictably.Jon Medhurst1-0/+28
Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of MRS instructionJon Medhurst1-11/+12
The MRS instruction should set mode and interrupt bits in the read value so it is simpler to use a new simulation routine (simulate_mrs) rather than some modified emulation. prep_emulate_rd12 is now unused and removed. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Reject probing MRS instructions which read SPSRJon Medhurst1-5/+7
We need to reject probing of instructions which read SPSR because we can't handle this as the value in SPSR is lost when the exception handler for the probe breakpoint first runs. This patch also fixes the bitmask for MRS instructions decoding to include checking bits 5-7. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of Data-processing (immediate) instructionsJon Medhurst1-1/+1
Emulation of instructions like "ADD rd, rn, #<const>" would result in a corrupted value for rd. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix emulation of CMP, CMN, TST and TEQ instructions.Jon Medhurst1-2/+53
Probing these instructions was corrupting R0 because the emulation code didn't account for the fact that they don't write a result to a register. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Remove redundant condition checks from simulation routinesJon Medhurst1-27/+3
Now we have the framework code handling conditionally executed instructions we can remove redundant checks in individual simulation routines. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28ARM: kprobes: Fix probing of conditionally executed instructionsJon Medhurst3-1/+96
When a kprobe is placed onto conditionally executed ARM instructions, many of the emulation routines used to single step them produce corrupt register results. Rather than fix all of these cases we modify the framework which calls them to test the relevant condition flags and, if the test fails, skip calling the emulation code. Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28kprobes/arm: Fix ldrd/strd emulationViktor Rosendahl1-5/+15
Currently emulate_ldrd and emulate_strd don't even have the adjustment of the PC value, so in case of Rn == PC, it will not update the PC incorrectly but instead load/store from the wrong address. Let's add both the adjustment of the PC value and the check for PC == PC. Signed-off-by: Viktor Rosendahl <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2011-04-28dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085Peter Korsgaard2-7/+23
The 88e6085 has a few differences from the other devices in the port control registers, causing unknown multicast/broadcast packets to get dropped when using the standard port setup. At the same time update kconfig to clarify that the mv88e6085 is now supported. Signed-off-by: Peter Korsgaard <[email protected]> Acked-by: Lennert Buytenhek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-28Merge branch 'drm-fixes' of ↵Linus Torvalds9-8/+49
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/i915: restore only the mode of this driver on lastclose (v2) drm/radeon/kms: add info query for tile pipes drm/radeon/kms: add missing safe regs for 6xx/7xx drm: select FRAMEBUFFER_CONSOLE_PRIMARY if we have FRAMEBUFFER_CONSOLE
2011-04-28Merge branch 'for-2.6.39' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/mm: Set all online nodes in N_NORMAL_MEMORY
2011-04-28Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds15-120/+163
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: nfs: don't lose MS_SYNCHRONOUS on remount of noac mount NFS: Return meaningful status from decode_secinfo() NFSv4: Ensure we request the ordinary fileid when doing readdirplus NFSv4: Ensure that clientid and session establishment can time out SUNRPC: Allow RPC calls to return ETIMEDOUT instead of EIO NFSv4.1: Don't loop forever in nfs4_proc_create_session NFSv4: Handle NFS4ERR_WRONGSEC outside of nfs4_handle_exception() NFSv4.1: Don't update sequence number if rpc_task is not sent NFSv4.1: Ensure state manager thread dies on last umount SUNRPC: Fix the SUNRPC Kerberos V RPCSEC_GSS module dependencies NFS: Use correct variable for page bounds checking NFS: don't negotiate when user specifies sec flavor NFS: Attempt mount with default sec flavor first NFS: flav_array honors NFS_MAX_SECFLAVORS NFS: Fix infinite loop in gss_create_upcall() Don't mark_inode_dirty_sync() while holding lock NFS: Get rid of pointless test in nfs_commit_done NFS: Remove unused argument from nfs_find_best_sec() NFS: Eliminate duplicate call to nfs_mark_request_dirty NFS: Remove dead code from nfs_fs_mount()
2011-04-28flex_arrays: allow zero length flex arraysEric Paris1-1/+10
Just like kmalloc will allow one to allocate a 0 length segment of memory flex arrays should do the same thing. It should bomb if you try to use something, but it should at least allow the allocation. This is needed because when SELinux switched to using flex_arrays in 2.6.38 the inability to allocate a 0 length array resulted in SELinux policy load returning -ENOSPC when previously it worked. Based-on-patch-by: Steffen Klassert <[email protected]> Signed-off-by: Eric Paris <[email protected]> Tested-by: Chris Richards <[email protected]> Cc: [email protected] [2.6.38+]
2011-04-28flex_array: flex_array_prealloc takes a number of elements, not an endEric Paris4-11/+14
Change flex_array_prealloc to take the number of elements for which space should be allocated instead of the last (inclusive) element. Users and documentation are updated accordingly. flex_arrays got introduced before they had users. When folks started using it, they ended up needing a different API than was coded up originally. This swaps over to the API that folks apparently need. Based-on-patch-by: Steffen Klassert <[email protected]> Signed-off-by: Eric Paris <[email protected]> Tested-by: Chris Richards <[email protected]> Acked-by: Dave Hansen <[email protected]> Cc: [email protected] [2.6.38+]
2011-04-28SELinux: pass last path component in may_createEric Paris1-1/+2
New inodes are created in a two stage process. We first will compute the label on a new inode in security_inode_create() and check if the operation is allowed. We will then actually re-compute that same label and apply it in security_inode_init_security(). The change to do new label calculations based in part on the last component of the path name only passed the path component information all the way down the security_inode_init_security hook. Down the security_inode_create hook the path information did not make it past may_create. Thus the two calculations came up differently and the permissions check might not actually be against the label that is created. Pass and use the same information in both places to harmonize the calculations and checks. Reported-by: Dominick Grift <[email protected]> Signed-off-by: Eric Paris <[email protected]>
2011-04-28usbnet: Resubmit interrupt URB if device is openPaul Stewart2-0/+9
Resubmit interrupt URB if device is open. Use a flag set in usbnet_open() to determine this state. Also kill and free interrupt URB in usbnet_disconnect(). [Rebased off git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git] Signed-off-by: Paul Stewart <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-28iwl4965: fix "TX Power requested while scanning"Stanislaw Gruszka1-4/+4
Fix the following: WARNING: at drivers/net/wireless/iwlegacy/iwl-4965.c:1128 \ iwl4965_send_tx_power+0x61/0x102 [iwl4965]() Hardware name: [...] TX Power requested while scanning! Pid: 5723, comm: kworker/u:28 Not tainted 2.6.39-0.rc4.4.fc14.x86_64 #1 Call Trace: [<ffffffff8104e27b>] warn_slowpath_common+0x85/0x9d [<ffffffffa02782e0>] ? iwl4965_show_temperature+0x49/0x49 [iwl4965] [<ffffffff8104e336>] warn_slowpath_fmt+0x46/0x48 [<ffffffffa027712f>] iwl4965_send_tx_power+0x61/0x102 [iwl4965] [<ffffffff81477e05>] ? mutex_lock+0x36/0x50 [<ffffffffa0278337>] iwl4965_bg_txpower_work+0x57/0x73 [iwl4965] [<ffffffff810647f3>] process_one_work+0x18d/0x286 [<ffffffff81065a5e>] worker_thread+0xfd/0x181 [<ffffffff81065961>] ? manage_workers.clone.16+0x172/0x172 [<ffffffff81069036>] kthread+0x82/0x8a [<ffffffff81480524>] kernel_thread_helper+0x4/0x10 [<ffffffff81068fb4>] ? kthread_worker_fn+0x14b/0x14b [<ffffffff81480520>] ? gs_change+0x13/0x13 Reported-and-tested-by: Paul Bolle <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-04-28iwlegacy: led stay solid on when no trafficWey-Yi Guy1-1/+19
commit 5ed540aecc2aae92d5c97b9a9306a5bf88ad5574 change the led behavior for iwlwifi driver; the side effect cause led blink all the time. Modify the led blink table to fix this problem Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-04-28b43: trivial: update module info about ucode16_mimo firmwareRafał Miłecki1-0/+1
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-04-28mm: check if PTE is already allocated during page faultMel Gorman1-1/+1
With transparent hugepage support, handle_mm_fault() has to be careful that a normal PMD has been established before handling a PTE fault. To achieve this, it used __pte_alloc() directly instead of pte_alloc_map as pte_alloc_map is unsafe to run against a huge PMD. pte_offset_map() is called once it is known the PMD is safe. pte_alloc_map() is smart enough to check if a PTE is already present before calling __pte_alloc but this check was lost. As a consequence, PTEs may be allocated unnecessarily and the page table lock taken. Thi useless PTE does get cleaned up but it's a performance hit which is visible in page_test from aim9. This patch simply re-adds the check normally done by pte_alloc_map to check if the PTE needs to be allocated before taking the page table lock. The effect is noticable in page_test from aim9. AIM9 2.6.38-vanilla 2.6.38-checkptenone creat-clo 446.10 ( 0.00%) 424.47 (-5.10%) page_test 38.10 ( 0.00%) 42.04 ( 9.37%) brk_test 52.45 ( 0.00%) 51.57 (-1.71%) exec_test 382.00 ( 0.00%) 456.90 (16.39%) fork_test 60.11 ( 0.00%) 67.79 (11.34%) MMTests Statistics: duration Total Elapsed Time (seconds) 611.90 612.22 (While this affects 2.6.38, it is a performance rather than a functional bug and normally outside the rules -stable. While the big performance differences are to a microbench, the difference in fork and exec performance may be significant enough that -stable wants to consider the patch) Reported-by: Raz Ben Yehuda <[email protected]> Signed-off-by: Mel Gorman <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Reviewed-by: Andrea Arcangeli <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: <[email protected]> [2.6.38.x] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-28kernel/watchdog.c: disable nmi perf event in the error path of enabling watchdogHillf Danton1-1/+4
In corner cases where softlockup watchdog is not setup successfully, the relevant nmi perf event for hardlockup watchdog could be disabled, then the status of the underlying hardware remains unchanged. Also, if the kthread doesn't start then the hrtimer won't run and the hardlockup detector will falsely fire. Signed-off-by: Hillf Danton <[email protected]> Signed-off-by: Don Zickus <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>