Revision 2be23c475af8ae4e25f8bab08d815b17593bd547 authored by Russell King on 08 September 2010, 15:27:56 UTC, committed by Russell King on 08 September 2010, 15:27:56 UTC
Dave Hylands reports: | We've observed a problem with dma_alloc_writecombine when the system | is under heavy load (heavy bus traffic). We've managed to reduce the | problem to the following snippet, which is run from a kthread in a | continuous loop: | | void *virtAddr; | dma_addr_t physAddr; | unsigned int numBytes = 256; | | for (;;) { | virtAddr = dma_alloc_writecombine(NULL, | numBytes, &physAddr, GFP_KERNEL); | if (virtAddr == NULL) { | printk(KERN_ERR "Running out of memory\n"); | break; | } | | /* access DMA memory allocated */ | tmp = virtAddr; | *tmp = 0x77; | | /* free DMA memory */ | dma_free_writecombine(NULL, | numBytes, virtAddr, physAddr); | | ...sleep here... | } | | By itself, the code will run forever with no issues. However, as we | increase our bus traffic (typically using DMA) then the *tmp = 0x77 | line will eventually cause a page fault. If we add a small delay (a | few microseconds) before the *tmp = 0x77, then we don't see a page | fault, even under heavy load. A dsb() is required after modifying the PTE entries to ensure that they will always be visible. Add this dsb(). Reported-by: Dave Hylands <dhylands@gmail.com> Tested-by: Dave Hylands <dhylands@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent a387f0f
File | Mode | Size |
---|---|---|
88pm860x-core.c | -rw-r--r-- | 17.2 KB |
88pm860x-i2c.c | -rw-r--r-- | 5.3 KB |
Kconfig | -rw-r--r-- | 17.8 KB |
Makefile | -rw-r--r-- | 2.7 KB |
ab3100-core.c | -rw-r--r-- | 23.0 KB |
ab3100-otp.c | -rw-r--r-- | 6.8 KB |
ab3550-core.c | -rw-r--r-- | 30.4 KB |
ab8500-core.c | -rw-r--r-- | 9.9 KB |
ab8500-spi.c | -rw-r--r-- | 3.0 KB |
abx500-core.c | -rw-r--r-- | 3.8 KB |
adp5520.c | -rw-r--r-- | 8.4 KB |
asic3.c | -rw-r--r-- | 23.7 KB |
da903x.c | -rw-r--r-- | 13.1 KB |
davinci_voicecodec.c | -rw-r--r-- | 4.8 KB |
dm355evm_msp.c | -rw-r--r-- | 10.8 KB |
ezx-pcap.c | -rw-r--r-- | 12.9 KB |
htc-egpio.c | -rw-r--r-- | 10.8 KB |
htc-i2cpld.c | -rw-r--r-- | 18.0 KB |
htc-pasic3.c | -rw-r--r-- | 5.4 KB |
janz-cmodio.c | -rw-r--r-- | 7.4 KB |
jz4740-adc.c | -rw-r--r-- | 8.9 KB |
lpc_sch.c | -rw-r--r-- | 3.5 KB |
max8925-core.c | -rw-r--r-- | 16.9 KB |
max8925-i2c.c | -rw-r--r-- | 4.7 KB |
max8998.c | -rw-r--r-- | 3.9 KB |
mc13783-core.c | -rw-r--r-- | 18.5 KB |
mcp-core.c | -rw-r--r-- | 5.9 KB |
mcp-sa11x0.c | -rw-r--r-- | 5.7 KB |
menelaus.c | -rw-r--r-- | 31.0 KB |
mfd-core.c | -rw-r--r-- | 2.8 KB |
pcf50633-adc.c | -rw-r--r-- | 6.1 KB |
pcf50633-core.c | -rw-r--r-- | 8.5 KB |
pcf50633-gpio.c | -rw-r--r-- | 3.3 KB |
pcf50633-irq.c | -rw-r--r-- | 7.8 KB |
rdc321x-southbridge.c | -rw-r--r-- | 3.2 KB |
sh_mobile_sdhi.c | -rw-r--r-- | 4.2 KB |
sm501.c | -rw-r--r-- | 40.6 KB |
stmpe.c | -rw-r--r-- | 22.0 KB |
stmpe.h | -rw-r--r-- | 5.3 KB |
t7l66xb.c | -rw-r--r-- | 11.3 KB |
tc35892.c | -rw-r--r-- | 7.4 KB |
tc6387xb.c | -rw-r--r-- | 5.8 KB |
tc6393xb.c | -rw-r--r-- | 22.2 KB |
timberdale.c | -rw-r--r-- | 20.8 KB |
timberdale.h | -rw-r--r-- | 3.4 KB |
tmio_core.c | -rw-r--r-- | 1.4 KB |
tps65010.c | -rw-r--r-- | 28.3 KB |
tps6507x.c | -rw-r--r-- | 3.2 KB |
tps6586x.c | -rw-r--r-- | 8.3 KB |
twl-core.c | -rw-r--r-- | 28.3 KB |
twl4030-codec.c | -rw-r--r-- | 6.7 KB |
twl4030-irq.c | -rw-r--r-- | 22.0 KB |
twl4030-power.c | -rw-r--r-- | 13.2 KB |
twl6030-irq.c | -rw-r--r-- | 8.4 KB |
twl6030-pwm.c | -rw-r--r-- | 3.6 KB |
ucb1400_core.c | -rw-r--r-- | 3.5 KB |
ucb1x00-assabet.c | -rw-r--r-- | 2.1 KB |
ucb1x00-core.c | -rw-r--r-- | 18.6 KB |
ucb1x00-ts.c | -rw-r--r-- | 10.4 KB |
wm831x-core.c | -rw-r--r-- | 37.8 KB |
wm831x-irq.c | -rw-r--r-- | 12.4 KB |
wm831x-otp.c | -rw-r--r-- | 1.8 KB |
wm8350-core.c | -rw-r--r-- | 18.0 KB |
wm8350-gpio.c | -rw-r--r-- | 6.1 KB |
wm8350-i2c.c | -rw-r--r-- | 2.8 KB |
wm8350-irq.c | -rw-r--r-- | 14.0 KB |
wm8350-regmap.c | -rw-r--r-- | 123.8 KB |
wm8400-core.c | -rw-r--r-- | 12.8 KB |
wm8994-core.c | -rw-r--r-- | 12.8 KB |
wm8994-irq.c | -rw-r--r-- | 7.0 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...