aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/mmap.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2011-05-25ocfs2/dlm: Add new dlm message DLM_BEGIN_EXIT_DOMAIN_MSGSunil Mushran4-11/+82
This patch adds a new dlm message DLM_BEGIN_EXIT_DOMAIN_MSG and ups the dlm protocol to 1.2. o2dlm sends this new message in dlm_unregister_domain() to mark the beginning of the exit domain. This message is sent to all nodes in the domain. Currently o2dlm has no way of informing other nodes of its impending exit. This information is useful as the other nodes could disregard the exiting node in certain operations. For example, in resource migration. If two or more nodes were umounting in parallel, it would be more efficient if o2dlm were to choose a non-exiting node to be the new master node rather than an exiting one. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2: change incorrect 'extern' keyword to 'static' in dlmfsRobin Dong1-1/+1
Change function param_set_dlmfs_capabilities from 'extern' to 'static' since function param_get_dlmfs_capabilities is also 'static'. Signed-off-by: Robin Dong <sanbai@taobao.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2/dlm: dlm_is_lockres_migrateable() returns booleanSunil Mushran2-84/+63
Patch cleans up the gunk added by commit 388c4bcb4e63e88fb1f312a2f5f9eb2623afcf5b. dlm_is_lockres_migrateable() now returns 1 if lockresource is deemed migrateable and 0 if not. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2: Add trace event for trim.Tao Ma2-0/+32
Add the corresponding trace event for trim. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2: Add FITRIM ioctl.Tao Ma1-0/+24
Add the corresponding ioctl function for FITRIM. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2: Add ocfs2_trim_fs for SSD trim support.Tao Ma2-0/+160
Add ocfs2_trim_fs to support trimming freed clusters in the volume. A range will be given and all the freed clusters greater than minlen will be discarded to the block layer. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2: remove the /sys/o2cb symlinkAmerigo Wang3-24/+4
It is obsoleted since Dec 2005. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23ocfs2: clean up mount option about atime in ocfs2.txtTiger Yang2-2/+8
As ocfs2 supports relatime and strictatime, we need update the relative document. Atime_quantum need work with strictatime, so only show it in procfs when mount with strictatime. Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-05-23hwmon: (coretemp) Add comments describing the handling of HT CPUsGuenter Roeck1-2/+18
The coretemp driver provides a single set of device attributes for each physical core of a HT CPU to avoid duplicate sensors. This functionality was introduced with commit d883b9f09772 ("hwmon: (coretemp) Skip duplicate CPU entries"). Commit e40cc4bdfd4b ("x86/hwmon: register alternate sibling upon CPU removal") extends this functionality to register the HT sibling of a CPU which is taken offline, to ensure that sensor attributes are provided if at least one HT sibling of a core is online. Add comments into the code describing the functionality in some more detail. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23kernel/watchdog.c: Use proper ANSI C prototypesLinus Torvalds1-1/+1
We try to enforce it by using -Wstrict-prototypes, but apparently they sometimes get through. Introduced by 4eec42f39204 ("watchdog: Change the default timeout and configure nmi watchdog period based"). Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-24perf tools: Fix sample type size calculation in 32 bits archsFrederic Weisbecker1-1/+1
The shift used here to count the number of bits set in the mask doesn't work above the low part for archs that are not 64 bits. Fix the constant used for the shift. This fixes a 32-bit perf top failure reported by Eric Dumazet: Can't parse sample, err = -14 Can't parse sample, err = -14 ... Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com Link: http://lkml.kernel.org/r/1306200686-17317-1-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-05-23Documentation: update GregKH linksVikram Narayanan1-4/+5
Fixed the broken links in the SubmittingPatches file. [ The old links turn out to not be broken after all, but the new links are certainly more readable - Linus ] Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23Documentation: fix vgaarbiter.txt typos etc.Nicolas Kaiser1-11/+9
Fixed typos. v2: Incorporated changes by Randy Dunlap. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23Documentation: update LXR web linkHarry Wei1-1/+1
Update LXR (Linux cross reference) web link. Signed-off-by: Harry Wei <harryxiyou@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23Documentation: update epoll sysctl textLucian Adrian Grijincu1-7/+0
max_user_instances was removed in this commit: commit 9df04e1f25effde823a600e755b51475d438f56b Author: Davide Libenzi <davidel@xmailserver.org> Date: Thu Jan 29 14:25:26 2009 -0800 epoll: drop max_user_instances and rely only on max_user_watches but the documentation entry was not removed. Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23Documentation: update dontdiff fileRandy Dunlap1-12/+46
v2, updated based on comments from Joe and Paul. Update to Documentation/dontdiff, based on many updates to various .gitignore patches over the last 2 years. Initially begun by Michael Prokop <mika@grml.org>, with lots of changes by Randy Dunlap. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Michael Prokop <mika@grml.org> Cc: Joe Perches <joe@perches.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23x86, apic: Include module.h header in apic_flat_64.cRandy Dunlap1-0/+1
apic_flat_64.c needs to include module.h because it uses EXPORT_SYMBOL_GPL(). This fixes these warnings on some !SMP randconfigs: arch/x86/kernel/apic/apic_flat_64.c:31: warning: data definition has no type or storage class arch/x86/kernel/apic/apic_flat_64.c:31: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/x86/kernel/apic/apic_flat_64.c:31: warning: parameter names (without types) in function declaration Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Link: http://lkml.kernel.org/r/20110523104300.dd532a99.randy.dunlap@oracle.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-05-23hwmon: (coretemp) Fix compile error if CONFIG_SMP is not definedGuenter Roeck1-1/+3
cpu_sibling_mask() is not defined unless CONFIG_SMP is defined, so it must not be used directly in the code without ifdef protection. To solve the problem and avoid ifdefs in the code, define for_each_sibling() and use it instead. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23ARM: bcmring: convert to use sp804 clockeventsRussell King1-110/+8
bcmring has a set of four sp804 timers incorporated, yet it has its own copy of the sp804 code. Convert its clockevent implementation to the standard sp804 support code. Cc: Jiandong Zheng <jdzheng@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: bcmring: convert to sp804 clocksourceRussell King2-64/+45
bcmring has a set of four sp804 timers incorporated, yet it has its own copy of the sp804 code. Convert its clocksource implementation to the standard sp804 support code. Cc: Jiandong Zheng <jdzheng@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: 6912/1: bcmring: Add clkdev table in init_earlyJiandong Zheng3-2/+7
Move adding clkdev table to init_early to make sure the common sp804 clockevents can be initialized properly. Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clockevents: ARM sp804: obtain sp804 timer rate via clksRussell King3-8/+16
This allows platforms to specify the rate of the SP804 clockevent via the clk subsystem. While ARM boards clock these at 1MHz, BCMRing also has SP804 timers but are clocked at different rates. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clockevents: ARM sp804: allow clockevent name to be specifiedRussell King7-10/+13
This allows platforms to specify the clcokevent name upon registration. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: ARM sp804: obtain sp804 timer rate via clksRussell King6-3/+77
This allows platforms to specify the rate of the SP804 clocksource via the clk subsystem. While ARM boards clock these at 1MHz, BCMRing also has SP804 timers but are clocked at different rates. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: ARM sp804: allow clocksource name to be specifiedRussell King7-8/+8
This allows platforms to specify the clocksource name upon registration, which is necessary should they wish to register more than one sp804 clocksource. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert OMAP1 to 32-bit down counting clocksourceRussell King2-17/+7
Convert the OMAP1 32-bit down counting clocksource to the generic clocksource infrastructure. Tested-by: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert MXS timrotv2 to 32-bit down counting clocksourceRussell King2-13/+8
Convert the MXS timrotv2 32-bit down counting clocksource to the generic clocksource infrastructure. Cc: Sascha Hauer <kernel@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert SPEAr platforms 16-bit up counting clocksourceRussell King2-14/+3
Convert SPEAr platforms 16-bit up counting clocksource, which requires a 16-bit register access read rather than 32-bit. Acked-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert Integrator/AP 16-bit down counting clocksourceRussell King2-18/+4
Convert the Integrator/AP 16-bit down-counting clocksource to the generic clocksource infrastructure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert W90x900 24-bit down counting clocksourceRussell King2-15/+3
Convert the W90x900 24-bit down-counting clocksource to the generic mmio clocksource infrastructure Acked-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert ARM 32-bit down counting clocksourcesRussell King6-87/+16
Convert SP804, MXC, Nomadik and Orion 32-bit down-counting clocksources to generic mmio clocksource infrastructure. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Alessandro Rubini <rubini@unipv.it> Acked-by: Linus Walleij <linus.walleij@linaro.org> Cc: Lennert Buytenhek <kernel@wantstofly.org> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: convert ARM 32-bit up counting clocksourcesRussell King10-145/+34
Convert ixp4xx, lpc32xx, mxc, netx, pxa, sa1100, tcc8k, tegra and u300 to use the generic mmio clocksource recently introduced. Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com> Cc: Olof Johansson <olof@lixom.net> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23clocksource: add common mmio clocksourceRussell King4-0/+85
Add a generic mmio clocksource, covering both 32-bit and 16-bit register access sizes, for up or down counters. This can be used to easily create clocksources for simple counter-based implementations. Cc: Alessandro Rubini <rubini@unipv.it> Cc: Colin Cross <ccross@android.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Erik Gilling <konkers@android.com> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: linux-omap@vger.kernel.org Acked-by: Nicolas Pitre <nico@fluxnic.net> Cc: Olof Johansson <olof@lixom.net> Tested-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: update sa1100 to reflect PXA updatesRussell King1-5/+3
Update sa1100 clockevents code to reflect what its later derivative does with clockevents_calc_mult_shift(). Use OSSR_M* constants too. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: omap1: convert to using readl/writel instead of volatile structRussell King1-15/+16
Tested-by: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: omap1: delete useless interrupt handlerRussell King1-15/+0
The OMAP1 clocksource interrupt handler just increments a variable which otherwise isn't used, so this seems to be unnecessary. Tony Lindgren confirms, so lets remove it. Acked-by: Kevin Hilman <khilman@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: s5p: consolidate selection of timer registerRussell King1-41/+17
s5p duplicates the runtime selection of the timer register three times. Move this out into a separate function. FIXME: It is unclear whether this code needs to support true runtime selection of the timer register, or whether it can be selected once at init time. Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: 6939/1: fix missing 'cpu_relax()' declarationMarc Zyngier1-0/+2
ARM build fails with the following symptom: CC arch/arm/kernel/asm-offsets.s In file included from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:57, from arch/arm/kernel/asm-offsets.c:13: include/linux/spinlock.h: In function 'spin_unlock_wait': include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax' make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1 Fix it by including <asm/processor.h>. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: 6895/1: mach-ux500: fix SMP secondary startup regressionLinus Walleij1-0/+3
Commit e2a083dc0da9aa6437e14811198379b18cdfa7f8 "ARM: consolidate SMP cross call implementation" broke the ux500 compilation since the smp.h header declared a function called from headsmp.S. This fixes it up by declaring it locally instead. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23ARM: consolidate SMP cross call implementationRussell King19-162/+37
Rather than having each platform class provide a mach/smp.h header for smp_cross_call(), arrange for them to register the function with the core ARM SMP code instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23block: move bd_set_size() above rescan_partitions() in __blkdev_get()Tejun Heo1-8/+9
02e352287a4 (block: rescan partitions on invalidated devices on -ENOMEDIA too) relocated partition rescan above explicit bd_set_size() to simplify condition check. As rescan_partitions() does its own bdev size setting, this doesn't break anything; however, rescan_partitions() prints out the following messages when adjusting bdev size, which can be confusing. sda: detected capacity change from 0 to 146815737856 sdb: detected capacity change from 0 to 146815737856 This patch restores the original order and remove the warning messages. stable: Please apply together with 02e352287a4 (block: rescan partitions on invalidated devices on -ENOMEDIA too). Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Tony Luck <tony.luck@gmail.com> Tested-by: Tony Luck <tony.luck@gmail.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-23ARM: Fix generic irq chipRussell King2-0/+3
As a result of c42321c (genirq: Make generic irq chip depend on CONFIG_GENERIC_IRQ_CHIP), we now need those platforms using this in my tree to select this symbol. Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Nicolas Pitre <nico@fluxnic.net> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-23hrtimers: Reorder clock basesThomas Gleixner2-7/+7
The ordering of the clock bases is historical due to the CLOCK_REALTIME and CLOCK_MONOTONIC constants. Now the hrtimer bases have their own enumeration due to the gap between CLOCK_MONOTONIC and CLOCK_BOOTTIME. So we can be more clever as most timers end up on the CLOCK_MONOTONIC base due to the virtue of POSIX declaring that relative CLOCK_REALTIME timers are not affected by time changes. In desktop environments this is slowly changing as applications switch to absolute timers, but I've observed empty CLOCK_REALTIME bases often enough. There is no performance penalty or overhead when CLOCK_REALTIME timers are active, but in case they are not we don't skip over a full cache line. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Peter Zijlstra <peterz@infradead.org>
2011-05-23hrtimers: Avoid touching inactive timer basesThomas Gleixner6-19/+29
Instead of iterating over all possible timer bases avoid it by marking the active bases in the cpu base. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Peter Zijlstra <peterz@infradead.org>
2011-05-23hrtimers: Make struct hrtimer_cpu_base layout less stupidThomas Gleixner1-1/+1
In the HIGHRES=y case we access the members at the end of struct hrtimer_cpu_base first and then the one at the beginning. Move the hrtimer data to front, so we have linear progressing access. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Peter Zijlstra <peterz@infradead.org>
2011-05-23timerfd: Manage cancelable timers in timerfdThomas Gleixner5-102/+113
Peter is concerned about the extra scan of CLOCK_REALTIME_COS in the timer interrupt. Yes, I did not think about it, because the solution was so elegant. I didn't like the extra list in timerfd when it was proposed some time ago, but with a rcu based list the list walk it's less horrible than the original global lock, which was held over the list iteration. Requested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Peter Zijlstra <peterz@infradead.org>
2011-05-23perf tools: Fix sample size bit operationsFrederic Weisbecker1-16/+16
What we want is to count the number of bits in the mask, not some other random operation written in the middle of the night. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1306148788-6179-2-git-send-email-fweisbec@gmail.com [ Fixed perf_event__names[] alignment which was nearby and hurting my eyes ... ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-05-23perf tools: Fix ommitted mmap data update on remapFrederic Weisbecker1-13/+26
Commit eac9eacee16 "perf tools: Check we are able to read the event size on mmap" brought a check to ensure we can read the size of the event before dereferencing it, and do a remap otherwise to move the buffer forward. However that remap was ommitting all the necessary work to update the new page offset, head, and to unmap previous pages, etc... To fix this, gather all the code that fetches the event in a seperate helper which does all the necessary checks about the header/event size and tells us anytime a remap is needed. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1306148788-6179-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-05-23apm-emulation: apm_mutex breaks ACK; remove itPaul Parsons1-5/+0
apm_mutex is locked by a process (e.g. apm -s) at the start of apm_ioctl() and remains locked while pm_suspend() is called. Any subsequent process trying to ACK the suspend (e.g. apmd) is then blocked at the start of apm_ioctl(), causing the suspend to be delayed for 5 seconds in apm_suspend_notifier() while the ACK times out. In short, ACKs don't work. The driver's data structures are sufficiently protected by assorted locks. And pm_suspend() has its own mutex to prevent reentrancy. Consequently there is no obvious requirement for apm_mutex, which evolved from earlier BKL calls. So let's remove it. Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-23watchdog: Change the default timeout and configure nmi watchdog period based on watchdog_threshMandeep Singh Baines3-7/+18
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 <msb@chromium.org> Cc: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1306127423-3347-4-git-send-email-msb@chromium.org Signed-off-by: Ingo Molnar <mingo@elte.hu> LKML-Reference: <20110517071642.GF22305@elte.hu>