aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-13ARM: OMAP: musb: Adding support for ti81xxRavi Babu1-0/+3
Added musb support for ti81xx platform which has two instances of musb interface and uses CPPI4.1 DMA. The current patch set adds support for single instance and in PIO mode only. Signed-off-by: Ajay Kumar Gupta <[email protected]> Signed-off-by: Ravi Babu <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: TI814X: Create board support and enable build for TI8148 EVMHemant Pedanekar4-6/+25
This patch adds minimal support and build configuration for TI8148 EVM. Also adds support for low level debugging on UART1 console on the EVM. Note that existing TI8168 EVM file (board-ti8168evm.c) is updated with machine info for TI8148 EVM. Signed-off-by: Hemant Pedanekar <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP4: board-4430sdp: Register platform device for digimic codecPeter Ujfalusi1-0/+6
OMAP4 SDP/Blaze boards have onboard digital microphones. Register the platform device for the dmic-codec to be able to use the microphones. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP4: devices: Register OMAP4 DMIC platform devicePeter Ujfalusi1-0/+22
Add platform device registration for OMAP4 DMIC. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: sdram-nokia: add 200 MHz memory timings infoIgor Dmitriev1-1/+24
Add memory timing info regarding the 200 MHz memory in sdram-nokia. Note that 100 MHz mode uses these same timings too. Signed-off-by: Igor Dmitriev <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]> Signed-off-by: Aaro Koskinen <[email protected]> [[email protected]: updated comments for 100 MHz timings] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: rx51: enable tsc2005 touchscreenAaro Koskinen1-2/+44
Enable TSC2005 touchscreen driver on the RX-51 board by providing the needed platform data. Signed-off-by: Aaro Koskinen <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: cm-t35: fix mux mode for DSS pinsIgor Grinberg1-14/+18
OMAP pin mux configuration API has been used incorrectly resulting in wrong mux mode set for several DSS pins. Signed-off-by: Igor Grinberg <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: cm-t35: Add reset for USB hubIgor Grinberg1-2/+20
USB hub is not functional until is reset. Reset the USB hub on SB-T35. Signed-off-by: Igor Grinberg <[email protected]> [[email protected]: updated subject] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: cm-t35: enable audioIgor Grinberg1-1/+2
TWL4030 audio codec is not being registered if no platform data is supplied. Provide platform data for the TWL4030 audio codec. Signed-off-by: Igor Grinberg <[email protected]> [[email protected]: updated subject] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: cm-t35: Use correct DSS regulator supplyIgor Grinberg1-10/+3
cm-t35 DSS suplies are connected to VIO. In fact, TPS65930 does not have VPLL2. Signed-off-by: Igor Grinberg <[email protected]> [[email protected]: updated subject] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP3: cm-t35: Add regulator for ads7846 touchscreenIgor Grinberg1-0/+18
ads7846 driver fails to find the regulator supply and as a result the touchscreen is not working. Fix this by adding a regulator supply for the ads7846 driver. Signed-off-by: Igor Grinberg <[email protected]> [[email protected]: updated subject] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: TI814X: Add cpu type macros and detection supportHemant Pedanekar4-0/+33
This patch adds cpu type, macros for identification of TI814X device. Signed-off-by: Hemant Pedanekar <[email protected]> [[email protected]: left out CK_TI814X for now] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: TI81XX: Prepare for addition of TI814X supportHemant Pedanekar16-76/+90
This patch updates existing macros, functions used for TI816X, to enable addition of other SoCs belonging to TI81XX family (e.g., TI814X). The approach taken is to use TI81XX/ti81xx for code/data going to be common across all TI81XX devices. cpu_is_ti81xx() is introduced to handle code common across TI81XX devices. In addition, ti8168_evm_map_io() is now replaced with ti81xx_map_io() and moved in mach-omap2/common.c as same will be used for TI814X and is not board specific. Signed-off-by: Hemant Pedanekar <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: ID: Chip detection for OMAP4470Leonid Iziumtsev2-1/+17
Add support for detection of the next chip in the OMAP4 family: OMAP4470 ES1.0 For more details on OMAP4470, visit: http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12869&contentId=123362 Signed-off-by: Leonid Iziumtsev <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: id: add chip id recognition for omap4430 es2.3David Anders2-2/+6
allow for the omap4430 es2.3 revision to be recognized in the omap4_check_revision() function. most aspects of all omap4430 es2.x versions are identical, however a number of small variations such as default pullup or pulldown resistor configurations vary between revisions. detailed information on silicon errata for omap4430 revisions can be found at http://focus.ti.com/pdfs/wtbu/swpz009D.pdf Signed-off-by: David Anders <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: am33xx: Update common OMAP machine specific sourcesAfzal Mohammed11-3/+105
This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device. Signed-off-by: Afzal Mohammed <[email protected]> Signed-off-by: Vaibhav Hiremath <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Tested-by: Kevin Hilman <[email protected]> [[email protected]: updated for map_io and common.h changes, dropped CK_AM33XX] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-13ARM: OMAP: am33xx: Update common omap platform filesAfzal Mohammed6-4/+35
This patch updates the common platform files with AM335X device support (AM33XX family). The approach taken in this patch is, AM33XX device will be considered as OMAP3 variant, and a separate SoC class created for AM33XX family of devices with a subclass type for AM335X device, which is newly added device in the family. This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks will return success on AM335X device. A kernel config option CONFIG_SOC_OMAPAM33XX is added under OMAP3 to include support for AM33XX build. Also, cpu_mask and RATE_IN_XXX flags have crossed 8 bit hence struct clksel_rate.flags, struct prcm_config.flags and cpu_mask are changed to u16 from u8. Signed-off-by: Afzal Mohammed <[email protected]> Signed-off-by: Vaibhav Hiremath <[email protected]> Cc: Hemant Pedanekar <[email protected]> [[email protected]: left out CK_AM33XX for now] Signed-off-by: Tony Lindgren <[email protected]>
2011-12-06ARM: 7194/1: OMAP: Fix build after a merge between v3.2-rc4 and ARM restart ↵Tony Lindgren1-1/+2
changes ARM restart changes needed changes to common.h to make it local. This conflicted with v3.2-rc4 DSS related hwmod changes that git mergetool was not able to handle. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-12-06ARM: 7192/1: OMAP: Fix build error for omap1_defconfigTony Lindgren1-0/+1
Otherwise we get the following error: In function 'omap_init_consistent_dma_size': error: implicit declaration of function 'init_consistent_dma_size' Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-12-05Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into ↵Russell King96-1406/+179
devel-stable
2011-12-05Merge branch 'for-rmk' of ↵Russell King679-5343/+7356
git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable Conflicts: arch/arm/common/gic.c arch/arm/plat-omap/include/plat/common.h
2011-12-05ARM: 7189/1: OMAP3: Fix build break in cpuidle34xx.c because of irq functionSantosh Shilimkar1-0/+1
Fix the below build break by including common.h arch/arm/mach-omap2/cpuidle34xx.c: In function 'omap3_enter_idle': arch/arm/mach-omap2/cpuidle34xx.c:117: error: implicit declaration of function 'omap_irq_pending' make[1]: *** [arch/arm/mach-omap2/cpuidle34xx.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-12-05ARM: 7188/1: OMAP2PLUS: Fix build error: 'omap2/omap3_intc_handle_irq' ↵Santosh Shilimkar1-0/+2
undeclared. Fix the build break by adding the necessary irq functions to common header. Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-12-03Merge branch 'irqchip-consolidation' of ↵Russell King2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable
2011-12-02Merge branches 'perf/event-nos', 'perf/updates' and 'perf/omap4' into for-rmkWill Deacon4-16/+200
2011-12-02arm: pmu: allow platform specific irq enable/disable handlingMing Lei2-5/+20
This patch introduces .enable_irq and .disable_irq into struct arm_pmu_platdata, so platform specific irq enablement can be handled after request_irq, and platform specific irq disablement can be handled before free_irq. This patch is for support of pmu irq routed from CTI on omap4. Acked-by: Jean Pihet <[email protected]> Reviewed-by: Will Deacon <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2011-12-02arm: introduce cross trigger interface helpersMing Lei1-0/+179
OMAP4 uses cross trigger interface(CTI) to route performance monitor irq to GIC, so introduce cti helpers to make access for cti easily. Acked-by: Jean Pihet <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2011-12-02ARM: perf: remove unused armpmu_get_max_eventsWill Deacon2-11/+1
armpmu_get_max_events is only called from perf_num_counters, so we can inline it there. It existed as a separate entity as a hangover from the original perf-based oprofile implementation. Signed-off-by: Will Deacon <[email protected]>
2011-12-02ARM: perf: add support for stalled cycle ABI eventsWill Deacon3-49/+66
Commit 8f622422 ("perf events: Add generic front-end and back-end stalled cycle event definitions") added two new ABI events for counting stalled cycles. This patch adds support for these new events to the ARM perf implementation. Cc: Jamie Iles <[email protected]> Cc: Jean Pihet <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2011-12-02ARM: perf: clean and update ARMv7 event numbersWill Deacon1-233/+125
This patch updates the ARMv7 perf event numbers so that: (1) A consistent naming scheme is used between different CPUs. (2) Only events actually used by Linux are described. (3) Where possible, architected events are used in preference to CPU-specific events. This results in the removal of a load of unused, hardcoded data and makes it more clear as to which events are supported on each PMU. Cc: Jean Pihet <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2011-12-02ARM: exynos4: Fix build errorAxel Lin1-1/+1
Trivial fix to fix below build error: CC arch/arm/mach-exynos/mach-universal_c210.o arch/arm/mach-exynos/mach-universal_c210.c:24: error: expected identifier or '(' before '<' token Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
2011-12-02ARM: exynos4: Fix build error due to 'gic_bank_offset' undeclaredAxel Lin1-1/+1
Fix below build error: CC arch/arm/mach-exynos/cpu.o arch/arm/mach-exynos/cpu.c: In function 'exynos4_init_irq': arch/arm/mach-exynos/cpu.c:245: error: 'gic_bank_offset' undeclared (first use in this function) arch/arm/mach-exynos/cpu.c:245: error: (Each undeclared identifier is reported only once arch/arm/mach-exynos/cpu.c:245: error: for each function it appears in.) arch/arm/mach-exynos/cpu.c:243: warning: unused variable 'bank_offset' make[1]: *** [arch/arm/mach-exynos/cpu.o] Error 1 make: *** [arch/arm/mach-exynos] Error 2 Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
2011-12-01Linux 3.2-rc4Linus Torvalds1-1/+1
2011-12-01Merge branch 'upstream-linus' of ↵Linus Torvalds31-536/+995
git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (31 commits) ocfs2: avoid unaligned access to dqc_bitmap ocfs2: Use filemap_write_and_wait() instead of write_inode_now() ocfs2: honor O_(D)SYNC flag in fallocate ocfs2: Add a missing journal credit in ocfs2_link_credits() -v2 ocfs2: send correct UUID to cleancache initialization ocfs2: Commit transactions in error cases -v2 ocfs2: make direntry invalid when deleting it fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free ocfs2: Avoid livelock in ocfs2_readpage() ocfs2: serialize unaligned aio ocfs2: Implement llseek() ocfs2: Fix ocfs2_page_mkwrite() ocfs2: Add comment about orphan scanning ocfs2: Clean up messages in the fs ocfs2/cluster: Cluster up now includes network connections too ocfs2/cluster: Add new function o2net_fill_node_map() ocfs2/cluster: Fix output in file elapsed_time_in_ms ocfs2/dlm: dlmlock_remote() needs to account for remastery ocfs2/dlm: Take inflight reference count for remotely mastered resources too ocfs2/dlm: Cleanup dlm_wait_for_node_death() and dlm_wait_for_node_recovery() ...
2011-12-01ocfs2: avoid unaligned access to dqc_bitmapAkinobu Mita2-5/+52
The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned, but not 64-bit aligned. The dqc_bitmap is accessed by ocfs2_set_bit(), ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit(). These are wrapper macros for ext2_*_bit() which need to take an unsigned long aligned address (though some architectures are able to handle unaligned address correctly) So some 64bit architectures may not be able to access the dqc_bitmap correctly. This avoids such unaligned access by using another wrapper functions for ext2_*_bit(). The code is taken from fs/ext4/mballoc.c which also need to handle unaligned bitmap access. Signed-off-by: Akinobu Mita <[email protected]> Acked-by: Joel Becker <[email protected]> Cc: Mark Fasheh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-12-01Merge branch 'fixes' of ↵Linus Torvalds27-120/+199
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: ARM: 7182/1: ARM cpu topology: fix warning ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and below ARM: 7180/1: Change kprobes testcase with unpredictable STRD instruction ARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation ARM: 7176/1: cpu_pm: register GIC PM notifier only once ARM: 7175/1: add subname parameter to mfp_set_groupg callers ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations ARM: 7171/1: unwind: add unwind directives to bitops assembly macros ARM: 7170/2: fix compilation breakage in entry-armv.S ARM: 7168/1: use cache type functions for arch_get_unmapped_area ARM: perf: check that we have a platform device when reserving PMU ARM: 7166/1: Use PMD_SHIFT instead of PGDIR_SHIFT in dma-consistent.c ARM: 7165/2: PL330: Fix typo in _prepare_ccr() ARM: 7163/2: PL330: Only register usable channels ARM: 7162/1: errata: tidy up Kconfig options for PL310 errata workarounds ARM: 7161/1: errata: no automatic store buffer drain ARM: perf: initialise used_mask for fake PMU during validation ARM: PMU: remove pmu_init declaration ARM: PMU: re-export release_pmu symbol to modules
2011-12-01Merge branch 'for-linus' of ↵Linus Torvalds9-25/+60
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix meta data raid-repair merge problem Btrfs: skip allocation attempt from empty cluster Btrfs: skip block groups without enough space for a cluster Btrfs: start search for new cluster at the beginning Btrfs: reset cluster's max_size when creating bitmap Btrfs: initialize new bitmaps' list Btrfs: fix oops when calling statfs on readonly device Btrfs: Don't error on resizing FS to same size Btrfs: fix deadlock on metadata reservation when evicting a inode Fix URL of btrfs-progs git repository in docs btrfs scrub: handle -ENOMEM from init_ipath()
2011-12-01Btrfs: fix meta data raid-repair merge problemJan Schmidt1-7/+20
Commit 4a54c8c16 introduced raid-repair, killing the individual readpage_io_failed_hook entries from inode.c and disk-io.c. Commit 4bb31e92 introduced new readahead code, adding a readpage_io_failed_hook to disk-io.c. The raid-repair commit had logic to disable raid-repair, if readpage_io_failed_hook is set. Thus, the readahead commit effectively disabled raid-repair for meta data. This commit changes the logic to always attempt raid-repair when needed and call the readpage_io_failed_hook in case raid-repair fails. This is much more straight forward and should have been like that from the beginning. Signed-off-by: Jan Schmidt <[email protected]> Reported-by: Stefan Behrens <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-11-30Merge branch 'for-linus' of ↵Linus Torvalds10-45/+62
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB: Fix RCU lockdep splats IB/ipoib: Prevent hung task or softlockup processing multicast response IB/qib: Fix over-scheduling of QSFP work RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2 RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic IB/qib: Don't use schedule_work()
2011-11-30Merge branch 'dt-for-linus' of git://sources.calxeda.com/kernel/linuxLinus Torvalds2-0/+3
* 'dt-for-linus' of git://sources.calxeda.com/kernel/linux: of: Add Silicon Image vendor prefix of/irq: of_irq_init: add check for parent equal to child node
2011-11-30Merge branch 'for-linus' of ↵Linus Torvalds3-4/+46
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: twl: fix twl4030 support for smps regulators regulator: fix use after free bug regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator
2011-11-30Merge branch 'fixes' of ↵Linus Torvalds71-270/+517
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits) ARM: ux500: update defconfig ARM: u300: update defconfig ARM: at91: enable additional boards in existing soc defconfig files ARM: at91: refresh soc defconfig files for 3.2 ARM: at91: rename defconfig files appropriately ARM: OMAP2+: Fix Compilation error when omap_l3_noc built as module ARM: OMAP2+: Remove empty io.h ARM: OMAP2: select ARM_AMBA if OMAP3_EMU is defined ARM: OMAP: smartreflex: fix IRQ handling bug ARM: OMAP: PM: only register TWL with voltage layer when device is present ARM: OMAP: hwmod: Fix the addr space, irq, dma count APIs arm: mx28: fix bit operation in clock setting ARM: imx: export imx_ioremap ARM: imx/mm-imx3: conditionally compile i.MX31 and i.MX35 code ARM: mx5: Fix checkpatch warnings in cpu-imx5.c MAINTAINERS: Add missing directory ARM: imx: drop 'ARCH_MX31' and 'ARCH_MX35' ARM: imx6q: move clock register map to machine_desc.map_io ARM: pxa168/gplugd: add the correct SSP device ARM: Update mach-types to fix mxs build breakage ...
2011-11-30ARM: 7182/1: ARM cpu topology: fix warningVincent Guittot2-2/+2
kernel/sched.c:7354:2: warning: initialization from incompatible pointer type Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef use int cpu instead of unsigned int cpu Cc: <[email protected]> Signed-off-by: Vincent Guittot <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-11-30ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and belowJon Medhurst (Tixy)2-10/+19
The SWP instruction is deprecated on ARMv6 and with ARMv7 it will be UNDEFINED when CONFIG_SWP_EMULATE is selected. In this case, probing a SWP instruction will cause an oops when the kprobes emulation code executes an undefined instruction. As the SWP instruction should be rare or non-existent in kernels for ARMv6 and later, we can simply avoid these problems by not allowing probing of these. Reported-by: Leif Lindholm <[email protected]> Tested-by: Leif Lindholm <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-11-30ARM: 7180/1: Change kprobes testcase with unpredictable STRD instructionJon Medhurst (Tixy)1-1/+1
There is a kprobes testcase for the instruction "strd r2, [r3], r4". This has unpredictable behaviour as it uses r3 for register writeback addressing and also stores it to memory. On a cortex A9, this testcase would fail because the instruction writes the updated value of r3 to memory, whereas the kprobes emulation code writes the original value. Fix this by changing testcase to used r5 instead of r3. Reported-by: Leif Lindholm <[email protected]> Tested-by: Leif Lindholm <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Jon Medhurst <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-11-30Btrfs: skip allocation attempt from empty clusterAlexandre Oliva1-3/+3
If we don't have a cluster, don't bother trying to allocate from it, jumping right away to the attempt to allocate a new cluster. Signed-off-by: Alexandre Oliva <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-11-30Btrfs: skip block groups without enough space for a clusterAlexandre Oliva1-1/+1
We test whether a block group has enough free space to hold the requested block, but when we're doing clustered allocation, we can save some cycles by testing whether it has enough room for the cluster upfront, otherwise we end up attempting to set up a cluster and failing. Only in the NO_EMPTY_SIZE loop do we attempt an unclustered allocation, and by then we'll have zeroed the cluster size, so this patch won't stop us from using the block group as a last resort. Signed-off-by: Alexandre Oliva <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-11-30Btrfs: start search for new cluster at the beginningAlexandre Oliva1-4/+2
Instead of starting at zero (offset is always zero), request a cluster starting at search_start, that denotes the beginning of the current block group. Signed-off-by: Alexandre Oliva <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-11-30Btrfs: reset cluster's max_size when creating bitmapAlexandre Oliva1-0/+1
The field that indicates the size of the largest contiguous chunk of free space in the cluster is not initialized when setting up bitmaps, it's only increased when we find a larger contiguous chunk. We end up retaining a larger value than appropriate for highly-fragmented clusters, which may cause pointless searches for large contiguous groups, and even cause clusters that do not meet the density requirements to be set up. Signed-off-by: Alexandre Oliva <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-11-30Btrfs: initialize new bitmaps' listAlexandre Oliva1-0/+1
We're failing to create clusters with bitmaps because setup_cluster_no_bitmap checks that the list is empty before inserting the bitmap entry in the list for setup_cluster_bitmap, but the list field is only initialized when it is restored from the on-disk free space cache, or when it is written out to disk. Besides a potential race condition due to the multiple use of the list field, filesystem performance severely degrades over time: as we use up all non-bitmap free extents, the try-to-set-up-cluster dance is done at every metadata block allocation. For every block group, we fail to set up a cluster, and after failing on them all up to twice, we fall back to the much slower unclustered allocation. To make matters worse, before the unclustered allocation, we try to create new block groups until we reach the 1% threshold, which introduces additional bitmaps and thus block groups that we'll iterate over at each metadata block request.