aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-05-23watchdog: Change the default timeout and configure nmi watchdog period based ↵Mandeep Singh Baines3-7/+18
on watchdog_thresh Before the conversion of the NMI watchdog to perf event, the watchdog timeout was 5 seconds. Now it is 60 seconds. For my particular application, netbooks, 5 seconds was a better timeout. With a short timeout, we catch faults earlier and are able to send back a panic. With a 60 second timeout, the user is unlikely to wait and will instead hit the power button, causing us to lose the panic info. This change configures the NMI period to watchdog_thresh and sets the softlockup_thresh to watchdog_thresh * 2. In addition, watchdog_thresh was reduced to 10 seconds as suggested by Ingo Molnar. Signed-off-by: Mandeep Singh Baines <[email protected]> Cc: Marcin Slusarz <[email protected]> Cc: Don Zickus <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Frederic Weisbecker <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> LKML-Reference: <[email protected]>
2011-05-23watchdog: Disable watchdog when thresh is zeroMandeep Singh Baines4-23/+20
This restores the previous behavior of softlock_thresh. Currently, setting watchdog_thresh to zero causes the watchdog kthreads to consume a lot of CPU. In addition, the logic of proc_dowatchdog_thresh and proc_dowatchdog_enabled has been factored into proc_dowatchdog. Signed-off-by: Mandeep Singh Baines <[email protected]> Cc: Marcin Slusarz <[email protected]> Cc: Don Zickus <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Frederic Weisbecker <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> LKML-Reference: <[email protected]>
2011-05-23watchdog: Only disable/enable watchdog if neccessaryMandeep Singh Baines1-8/+12
Don't take any action on an unsuccessful write to /proc. Signed-off-by: Mandeep Singh Baines <[email protected]> Cc: Marcin Slusarz <[email protected]> Cc: Don Zickus <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Frederic Weisbecker <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-05-23watchdog: Fix rounding bug in get_sample_period()Mandeep Singh Baines1-1/+1
In get_sample_period(), softlockup_thresh is integer divided by 5 before the multiplication by NSEC_PER_SEC. This results in softlockup_thresh being rounded down to the nearest integer multiple of 5. For example, a softlockup_thresh of 4 rounds down to 0. Signed-off-by: Mandeep Singh Baines <[email protected]> Cc: Marcin Slusarz <[email protected]> Cc: Don Zickus <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Frederic Weisbecker <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-05-23b43: fix comment typo reqest -> requestJim Cromie1-2/+2
Recent trivial fix corrected 'occured', but left 'reqest'. codespell needs another dictionary entry. cc: Lucas De Marchi <[email protected]> Signed-off-by: Jim Cromie <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-05-23HID: hid-multitouch: cosmetic changes, sort classes and devicesBenjamin Tissoires2-48/+54
This patch sorts the defs for the MT_CLS. I choose to split generic classes and device specific ones to be able to add more generic classes in the future. It also put eGalax devices at their right place (alphabetically) in mt_devices. Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-05-22Merge branch 'for-linus' of ↵Linus Torvalds27-386/+603
git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: nilfs2: use mark_buffer_dirty to mark btnode or meta data dirty nilfs2: always set back pointer to host inode in mapping->host nilfs2: get rid of NILFS_I_NILFS nilfs2: use list_first_entry nilfs2: use empty_aops for gc-inodes nilfs2: implement resize ioctl nilfs2: add truncation routine of segment usage file nilfs2: add routine to move secondary super block nilfs2: add ioctl which limits range of segment to be allocated nilfs2: zero fill unused portion of super root block nilfs2: super root size should change depending on inode size nilfs2: get rid of private page allocator nilfs2: merge list_del()/list_add_tail() to list_move_tail()
2011-05-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6Linus Torvalds5-7/+7
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: ide/ide-scan-pci.c: Use for_each_pci_dev(). ide: Use linux/mutex.h IDE: ide-floppy, remove unnecessary NULL check drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdata ide: fix use after free in ide-acpi
2011-05-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6Linus Torvalds55-1684/+1553
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (28 commits) sparc32: fix build, fix missing cpu_relax declaration SCHED_TTWU_QUEUE is not longer needed since sparc32 now implements IPI sparc32,leon: Remove unnecessary page_address calls in LEON DMA API. sparc: convert old cpumask API into new one sparc32, sun4d: Implemented SMP IPIs support for SUN4D machines sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines sparc32,leon: Implemented SMP IPIs for LEON CPU sparc32: implement SMP IPIs using the generic functions sparc32,leon: SMP power down implementation sparc32,leon: added some SMP comments sparc: add {read,write}*_be routines sparc32,leon: don't rely on bootloader to mask IRQs sparc32,leon: operate on boot-cpu IRQ controller registers sparc32: always define boot_cpu_id sparc32: removed unused code, implemented by generic code sparc32: avoid build warning at mm/percpu.c:1647 sparc32: always register a PROM based early console sparc32: probe for cpu info only during startup sparc: consolidate show_cpuinfo in cpu.c sparc32,leon: implement genirq CPU affinity ...
2011-05-22Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds8-534/+535
* 'for-linus' of git://neil.brown.name/md: md: allow resync_start to be set while an array is active. md/raid10: reformat some loops with less indenting. md/raid10: remove unused variable. md/raid10: make more use of 'slot' in raid10d. md/raid10: some tidying up in fix_read_error md/raid1: improve handling of pages allocated for write-behind. md/raid1: try fix_sync_read_error before process_checks. md/raid1: tidy up new functions: process_checks and fix_sync_read_error. md/raid1: split out two sub-functions from sync_request_write md: make error_handler functions more uniform and correct. md/multipath: discard ->working_disks in favour of ->degraded md/raid1: clean up read_balance. md: simplify raid10 read_balance md/bitmap: fix saving of events_cleared and other state. md: reject a re-add request that cannot be honoured. md: Fix race when creating a new md device.
2011-05-22wireless: fix fatal kernel-doc error + warning in mac80211.hRandy Dunlap1-1/+2
Fix new kernel-doc Error and Warning in <net/mac80211.h>: Error(linux-2.6.39-git5/include/net/mac80211.h:550): cannot understand prototype: 'struct ieee80211_sched_scan_ies ' Warning(linux-2.6.39-git5/include/net/mac80211.h:2289): No description found for parameter 'sta' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22x86: setup_smep needs to be __cpuinitLinus Torvalds1-2/+2
The setup_smep function gets calle at resume time too, and is thus not a pure __init function. When marked as __init, it gets thrown out after the kernel has initialized, and when the kernel is suspended and resumed, the code will no longer be around, and we'll get a nice "kernel tried to execute NX-protected page" oops because the page is no longer marked executable. Reported-and-tested-by: Parag Warudkar <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22Remove prefetch() from <linux/skbuff.h> and "netlabel_addrlist.h"Linus Torvalds2-8/+7
Commit e66eed651fd1 ("list: remove prefetching from regular list iterators") removed the include of prefetch.h from list.h. The skbuff list traversal still had them. Quoth David Miller: "Please just remove the prefetches. Those are modelled after list.h as I intend to eventually convert SKB list handling to "struct list_head" but we're not there yet. Therefore if we kill prefetches from list.h we should kill it from these things in skbuff.h too." Requested-by: David Miller <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22Add appropriate <linux/prefetch.h> include for prefetch usersPaul Gortmaker38-0/+38
After discovering that wide use of prefetch on modern CPUs could be a net loss instead of a win, net drivers which were relying on the implicit inclusion of prefetch.h via the list headers showed up in the resulting cleanup fallout. Give them an explicit include via the following $0.02 script. ========================================= #!/bin/bash MANUAL="" for i in `git grep -l 'prefetch(.*)' .` ; do grep -q '<linux/prefetch.h>' $i if [ $? = 0 ] ; then continue fi ( echo '?^#include <linux/?a' echo '#include <linux/prefetch.h>' echo . echo w echo q ) | ed -s $i > /dev/null 2>&1 if [ $? != 0 ]; then echo $i needs manual fixup MANUAL="$i $MANUAL" fi done echo ------------------- 8\<---------------------- echo vi $MANUAL ========================================= Signed-off-by: Paul <[email protected]> [ Fixed up some incorrect #include placements, and added some non-network drivers and the fib_trie.c case - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22sparc32: fix build, fix missing cpu_relax declarationSam Ravnborg1-0/+1
Fix following sparc (32 bit) build error: CC arch/sparc/kernel/asm-offsets.s In file included from include/linux/seqlock.h:29:0, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:57, from arch/sparc/kernel/asm-offsets.c:13: include/linux/spinlock.h: In function 'spin_unlock_wait': include/linux/spinlock.h:360:2: error: implicit declaration of function 'cpu_relax' Most likely caused by commit e66eed651fd1 ("list: remove prefetching from regular list iterators") due to include changes. Signed-off-by: Sam Ravnborg <[email protected]> Cc: Stephen Rothwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22bnx2x: allow device properly initialize after hotplugDmitry Kravkov1-43/+24
Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22bnx2x: fix DMAE timeout according to hw specificationsDmitry Kravkov1-1/+1
Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22bnx2x: properly handle CFC DEL in cnic flowVladislav Zolotarov1-1/+2
Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22bnx2x: call dev_kfree_skb_any instead of dev_kfree_skbVladislav Zolotarov2-3/+3
replace function calls when possible call in both irq/non-irq contexts Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: filter: move forward declarations to avoid compile warningsHeiko Carstens1-3/+4
Get rid of this compile warning: In file included from arch/s390/kernel/compat_linux.c:37:0: include/linux/filter.h:139:23: warning: 'struct sk_buff' declared inside parameter list Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22pktgen: refactor pg_init() codeWANG Cong1-7/+12
This also shrinks the object size a little. text data bss dec hex filename 28834 186 8 29028 7164 net/core/pktgen.o 28816 186 8 29010 7152 net/core/pktgen.o.AFTER Signed-off-by: WANG Cong <[email protected]> Cc: "David Miller" <[email protected]>, Signed-off-by: David S. Miller <[email protected]>
2011-05-22pktgen: use vzalloc_node() instead of vmalloc_node() + memset()WANG Cong1-2/+1
Signed-off-by: WANG Cong <[email protected]> Cc: "David S. Miller" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: skb_trim explicitely check the linearity instead of data_lenEmmanuel Grumbach1-1/+1
The purpose of the check on data_len is to check linearity, so use the inline helper for this. No overhead and more explicit. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22ipv4: Give backtrace in ip_rt_bug().Dave Jones1-0/+1
Add a stack backtrace to the ip_rt_bug path for debugging Signed-off-by: Dave Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: avoid synchronize_rcu() in dev_deactivate_manyEric Dumazet1-2/+15
dev_deactivate_many() issues one synchronize_rcu() call after qdiscs set to noop_qdisc. This call is here to make sure they are no outstanding qdisc-less dev_queue_xmit calls before returning to caller. But in dismantle phase, we dont have to wait, because we wont activate again the device, and we are going to wait one rcu grace period later in rollback_registered_many(). After this patch, device dismantle uses one synchronize_net() and one rcu_barrier() call only, so we have a ~30% speedup and a smaller RTNL latency. Signed-off-by: Eric Dumazet <[email protected]> CC: Patrick McHardy <[email protected]>, CC: Ben Greear <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: remove synchronize_net() from netdev_set_master()Eric Dumazet2-3/+2
In the old days, we used to access dev->master in __netif_receive_skb() in a rcu_read_lock section. So one synchronize_net() call was needed in netdev_set_master() to make sure another cpu could not use old master while/after we release it. We now use netdev_rx_handler infrastructure and added one synchronize_net() call in bond_release()/bond_release_all() Remove the obsolete synchronize_net() from netdev_set_master() and add one in bridge del_nbp() after its netdev_rx_handler_unregister() call. This makes enslave -d a bit faster. Signed-off-by: Eric Dumazet <[email protected]> CC: Jiri Pirko <[email protected]> CC: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22rtnetlink: ignore NETDEV_RELEASE and NETDEV_JOIN eventAmerigo Wang1-0/+2
These two events are not expected to be caught by userspace. Signed-off-by: WANG Cong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: rename NETDEV_BONDING_DESLAVE to NETDEV_RELEASEAmerigo Wang3-5/+5
s/NETDEV_BONDING_DESLAVE/NETDEV_RELEASE/ as Andy suggested. Signed-off-by: WANG Cong <[email protected]> Cc: Andy Gospodarek <[email protected]> Cc: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22bridge: call NETDEV_JOIN notifiers when add a slaveAmerigo Wang1-0/+2
In the previous patch I added NETDEV_JOIN, now we can notify netconsole when adding a device to a bridge too. Signed-off-by: WANG Cong <[email protected]> Cc: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22netpoll: disable netpoll when enslave a deviceAmerigo Wang3-9/+20
V3: rename NETDEV_ENSLAVE to NETDEV_JOIN Currently we do nothing when we enslave a net device which is running netconsole. Neil pointed out that we may get weird results in such case, so let's disable netpoll on the device being enslaved. I think it is too harsh to prevent the device being ensalved if it is running netconsole. By the way, this patch also removes the NETDEV_GOING_DOWN from netconsole netdev notifier, because netpoll will check if the device is running or not and we don't handle NETDEV_PRE_UP neither. This patch is based on net-next-2.6. Signed-off-by: WANG Cong <[email protected]> Cc: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22macvlan: Forward unicast frames in bridge mode to lowerdevDavid Ward1-4/+2
Unicast frames between macvlan interfaces in bridge mode are not otherwise sent to network taps on the lowerdev (as all other macvlan frames are), so forward the frames to the receive queue of the lowerdev first. Signed-off-by: David Ward <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: Remove linux/prefetch.h include from linux/skbuff.hDavid S. Miller1-1/+0
No longer needed. Signed-off-by: David S. Miller <[email protected]>
2011-05-22ipv4: Include linux/prefetch.h in fib_trie.cDavid S. Miller1-0/+1
Signed-off-by: David S. Miller <[email protected]>
2011-05-22netlabel: Remove prefetches from list handlers.David S. Miller1-4/+4
Signed-off-by: David S. Miller <[email protected]>
2011-05-22drivers/net: add prefetch header for prefetch usersPaul Gortmaker32-0/+32
After discovering that wide use of prefetch on modern CPUs could be a net loss instead of a win, net drivers which were relying on the implicit inclusion of prefetch.h via the list headers showed up in the resulting cleanup fallout. Give them an explicit include via the following $0.02 script. ========================================= #!/bin/bash MANUAL="" for i in `git grep -l 'prefetch(.*)' .` ; do grep -q '<linux/prefetch.h>' $i if [ $? = 0 ] ; then continue fi ( echo '?^#include <linux/?a' echo '#include <linux/prefetch.h>' echo . echo w echo q ) | ed -s $i > /dev/null 2>&1 if [ $? != 0 ]; then echo $i needs manual fixup MANUAL="$i $MANUAL" fi done echo ------------------- 8\<---------------------- echo vi $MANUAL ========================================= Signed-off-by: Paul <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22rionet: Remove pointless printk of skb pointer.David S. Miller1-2/+2
Casting to u32 warns anyways. Signed-off-by: David S. Miller <[email protected]>
2011-05-22net: Remove prefetches from SKB list handlers.David S. Miller1-3/+3
Noticed by Linus. Signed-off-by: David S. Miller <[email protected]>
2011-05-22caif: Plug memory leak for checksum error[email protected]1-1/+6
In case of checksum error, the framing layer returns -EILSEQ, but does not free the packet. Plug this hole by freeing the packet if -EILSEQ is returned. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22caif: Update documentation of CAIF transmit and receive functions.[email protected]1-15/+21
Trivial patch updating documentation in header files only. Error handling of CAIF transmit errors was changed by commit: caif: Don't resend if dev_queue_xmit fails. This patch updates the documentation accordingly. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22caif: Fix freezes when running CAIF loopback device[email protected]1-4/+5
Fix spinlock bugs when running out of link-ids in loopback tests and avoid allocating link-id when error is set in link-setup-response. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22caif: Fixes freeze on Link layer removal.[email protected]3-44/+62
CAIF Socket layer - caif_socket.c: - Plug mem-leak at reconnect. - Always call disconnect to cleanup CAIF stack. - Disconnect will always report success. CAIF configuration layer - cfcnfg.c - Disconnect must dismantle the caif stack correctly - Protect against faulty removals (check on id zero) CAIF mux layer - cfmuxl.c - When inserting new service layer in the MUX remove any old entries with the same ID. - When removing CAIF Link layer, remove the associated service layers before notifying service layers. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22caif: Bugfix add check NULL pointer before calling functions.[email protected]1-9/+26
Add check on layer->dn != NULL before calling functions in layer below. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-22Give up on pushing CC_OPTIMIZE_FOR_SIZELinus Torvalds1-1/+0
I still happen to believe that I$ miss costs are a major thing, but sadly, -Os doesn't seem to be the solution. With or without it, gcc will miss some obvious code size improvements, and with it enabled gcc will sometimes make choices that aren't good even with high I$ miss ratios. For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy into a "rep movsl". While I sincerely hope that x86 CPU's will some day do a good job at that, they certainly don't do it yet, and the cost is higher than a L1 I$ miss would be. Some day I hope we can re-enable this. Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6Linus Torvalds19-706/+723
* 'viafb-next' of git://github.com/schandinat/linux-2.6: (24 commits) viafb: Automatic OLPC XO-1.5 configuration viafb: remove unused CEA mode viafb: try to map less memory in case of failure viafb: use write combining for video ram viafb: add X server compatibility mode viafb: reduce OLPC refresh a bit viafb: fix OLPC XO 1.5 device connection viafb: fix OLPC DCON refresh rate viafb: delete clock and PLL initialization viafb: replace custom return values viafb: some small cleanup for global variables viafb: gather common good, old VGA initialization in one place viafb: add engine clock support viafb: add VIA slapping capability viafb: split clock and PLL code to an extra file viafb: add primary/secondary clock on/off switches viafb: add clock source selection and PLL power management support viafb: prepare for PLL separation viafb: call viafb_get_clk_value only in viafb_set_vclock viafb: remove unused max_hres/vres ...
2011-05-22Merge branch 'for-linus' of ↵Linus Torvalds12-130/+206
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6: [PARISC] wire up syncfs syscall [PARISC] wire up the fhandle syscalls [PARISC] wire up clock_adjtime syscall [PARISC] wire up fanotify syscalls [PARISC] prevent speculative re-read on cache flush [PARISC] only make executable areas executable [PARISC] fix pacache .size with new binutils
2011-05-22net: add missing prefetch.h includeHeiko Carstens1-0/+1
Fixes build errors on s390 and probably other archs as well: In file included from net/ipv4/ip_forward.c:32:0: include/net/udp.h: In function 'udp_csum_outgoing': include/net/udp.h:141:2: error: implicit declaration of function 'prefetch' Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22fs: add missing prefetch.h includeHeiko Carstens1-0/+1
Fixes this build error on s390 and probably other archs as well: fs/inode.c: In function 'new_inode': fs/inode.c:894:2: error: implicit declaration of function 'spin_lock_prefetch' Signed-off-by: Heiko Carstens <[email protected]> [ Happens on architectures that don't define their own prefetch functions in <asm/processor.h>, and instead rely on the default ones in <linux/prefetch.h> - Linus] Signed-off-by: Linus Torvalds <[email protected]>
2011-05-22KVM: MMU: Use ptep_user for cmpxchg_gpte()Takuya Yoshikawa1-14/+12
The address of the gpte was already calculated and stored in ptep_user before entering cmpxchg_gpte(). This patch makes cmpxchg_gpte() to use that to make it clear that we are using the same address during walk_addr_generic(). Note that the unlikely annotations are used to show that the conditions are something unusual rather than for performance. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2011-05-22KVM: Fix kvm mmu_notifier initialization orderOGAWA Hirofumi1-1/+1
Like the following, mmu_notifier can be called after registering immediately. So, kvm have to initialize kvm->mmu_lock before it. BUG: spinlock bad magic on CPU#0, kswapd0/342 lock: ffff8800af8c4000, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 342, comm: kswapd0 Not tainted 2.6.39-rc5+ #1 Call Trace: [<ffffffff8118ce61>] spin_bug+0x9c/0xa3 [<ffffffff8118ce91>] do_raw_spin_lock+0x29/0x13c [<ffffffff81024923>] ? flush_tlb_others_ipi+0xaf/0xfd [<ffffffff812e22f3>] _raw_spin_lock+0x9/0xb [<ffffffffa0582325>] kvm_mmu_notifier_clear_flush_young+0x2c/0x66 [kvm] [<ffffffff810d3ff3>] __mmu_notifier_clear_flush_young+0x2b/0x57 [<ffffffff810c8761>] page_referenced_one+0x88/0xea [<ffffffff810c89bf>] page_referenced+0x1fc/0x256 [<ffffffff810b2771>] shrink_page_list+0x187/0x53a [<ffffffff810b2ed7>] shrink_inactive_list+0x1e0/0x33d [<ffffffff810acf95>] ? determine_dirtyable_memory+0x15/0x27 [<ffffffff812e90ee>] ? call_function_single_interrupt+0xe/0x20 [<ffffffff810b3356>] shrink_zone+0x322/0x3de [<ffffffff810a9587>] ? zone_watermark_ok_safe+0xe2/0xf1 [<ffffffff810b3928>] kswapd+0x516/0x818 [<ffffffff810b3412>] ? shrink_zone+0x3de/0x3de [<ffffffff81053d17>] kthread+0x7d/0x85 [<ffffffff812e9394>] kernel_thread_helper+0x4/0x10 [<ffffffff81053c9a>] ? __init_kthread_worker+0x37/0x37 [<ffffffff812e9390>] ? gs_change+0xb/0xb Signed-off-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: Add documentation for KVM_CAP_NR_VCPUSPekka Enberg1-1/+4
Document KVM_CAP_NR_VCPUS that can be used by the userspace to determine maximum number of VCPUs it can create with the KVM_CREATE_VCPU ioctl. Cc: Avi Kivity <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Jan Kiszka <[email protected]> Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Avi Kivity <[email protected]>