aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2011-05-26mm: move enum vm_event_item into a standalone header fileAndrew Morton2-61/+65
enums are problematic because they cannot be forward-declared: akpm2:/home/akpm> cat t.c enum foo; static inline void bar(enum foo f) { } akpm2:/home/akpm> gcc -c t.c t.c:4: error: parameter 1 ('f') has incomplete type So move the enum's definition into a standalone header file which can be used wherever its definition is needed. Cc: Ying Han <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Daisuke Nishimura <[email protected]> Cc: Balbir Singh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26cgroup: remove the ns_cgroupDaniel Lezcano3-18/+0
The ns_cgroup is an annoying cgroup at the namespace / cgroup frontier and leads to some problems: * cgroup creation is out-of-control * cgroup name can conflict when pids are looping * it is not possible to have a single process handling a lot of namespaces without falling in a exponential creation time * we may want to create a namespace without creating a cgroup The ns_cgroup was replaced by a compatibility flag 'clone_children', where a newly created cgroup will copy the parent cgroup values. The userspace has to manually create a cgroup and add a task to the 'tasks' file. This patch removes the ns_cgroup as suggested in the following thread: https://lists.linux-foundation.org/pipermail/containers/2009-June/018616.html The 'cgroup_clone' function is removed because it is no longer used. This is a userspace-visible change. Commit 45531757b45c ("cgroup: notify ns_cgroup deprecated") (merged into 2.6.27) caused the kernel to emit a printk warning users that the feature is planned for removal. Since that time we have heard from XXX users who were affected by this. Signed-off-by: Daniel Lezcano <[email protected]> Signed-off-by: Serge E. Hallyn <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Jamal Hadi Salim <[email protected]> Reviewed-by: Li Zefan <[email protected]> Acked-by: Paul Menage <[email protected]> Acked-by: Matt Helsley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26cgroups: add per-thread subsystem callbacksBen Blum1-4/+6
Add cgroup subsystem callbacks for per-thread attachment in atomic contexts Add can_attach_task(), pre_attach(), and attach_task() as new callbacks for cgroups's subsystem interface. Unlike can_attach and attach, these are for per-thread operations, to be called potentially many times when attaching an entire threadgroup. Also, the old "bool threadgroup" interface is removed, as replaced by this. All subsystems are modified for the new interface - of note is cpuset, which requires from/to nodemasks for attach to be globally scoped (though per-cpuset would work too) to persist from its pre_attach to attach_task and attach. This is a pre-patch for cgroup-procs-writable.patch. Signed-off-by: Ben Blum <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Li Zefan <[email protected]> Cc: Matt Helsley <[email protected]> Reviewed-by: Paul Menage <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: David Rientjes <[email protected]> Cc: Miao Xie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26cgroups: read-write lock CLONE_THREAD forking per threadgroupBen Blum2-0/+45
Adds functionality to read/write lock CLONE_THREAD fork()ing per-threadgroup Add an rwsem that lives in a threadgroup's signal_struct that's taken for reading in the fork path, under CONFIG_CGROUPS. If another part of the kernel later wants to use such a locking mechanism, the CONFIG_CGROUPS ifdefs should be changed to a higher-up flag that CGROUPS and the other system would both depend on. This is a pre-patch for cgroup-procs-write.patch. Signed-off-by: Ben Blum <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Li Zefan <[email protected]> Cc: Matt Helsley <[email protected]> Reviewed-by: Paul Menage <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: David Rientjes <[email protected]> Cc: Miao Xie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26drivers/rtc/rtc-mxc.c: remove defines already included in rtc.hWolfram Sang1-4/+4
[[email protected]: retain the code comments] Signed-off-by: Wolfram Sang <[email protected]> Cc: Vladimir Zapolskiy <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26flex_array: avoid divisions when accessing elementsJesse Gross1-0/+2
On most architectures division is an expensive operation and accessing an element currently requires four of them. This performance penalty effectively precludes flex arrays from being used on any kind of fast path. However, two of these divisions can be handled at creation time and the others can be replaced by a reciprocal divide, completely avoiding real divisions on access. [[email protected]: rebase on top of changes to support 0 len elements] [[email protected]: initialize part_nr when array fits entirely in base] Signed-off-by: Jesse Gross <[email protected]> Signed-off-by: Eric Paris <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26Intel xhci: Add PCI id for Panther Point xHCI host.Sarah Sharp1-0/+1
This adds the PCI ID for the xHCI (USB 3.0) host controller in the Intel Panther Point chipset. It will be used by both the EHCI and xHCI driver in the following patches. Signed-off-by: Sarah Sharp <[email protected]>
2011-05-26Merge branches 'core-fixes-for-linus' and 'irq-fixes-for-linus' of ↵Linus Torvalds1-3/+0
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: seqlock: Get rid of SEQLOCK_UNLOCKED * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: irq: Remove smp_affinity_list when unregister irq proc
2011-05-26Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2-0/+112
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: gpio/via: rename VIA local config struct basic_mmio_gpio: split into a gpio library and platform device gpio: remove some legacy comments in build files gpio: add trace events for setting direction and value gpio/pca953x: Use handle_simple_irq instead of handle_edge_irq gpiolib: export gpiochip_find gpio: remove redundant Kconfig depends on GPIOLIB basic_mmio_gpio: convert to non-__raw* accessors basic_mmio_gpio: support direction registers basic_mmio_gpio: support different input/output registers basic_mmio_gpio: detect output method at probe time basic_mmio_gpio: request register regions basic_mmio_gpio: allow overriding number of gpio basic_mmio_gpio: convert to platform_{get,set}_drvdata() basic_mmio_gpio: remove runtime width/endianness evaluation
2011-05-26Merge branch 'for-next' of ↵Linus Torvalds13-52/+348
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (57 commits) regulator: Fix 88pm8607.c printk format warning input: Add support for Qualcomm PMIC8XXX power key input: Add Qualcomm pm8xxx keypad controller driver mfd: Add omap-usbhs runtime PM support mfd: Fix ASIC3 SD Host Controller Configuration size mfd: Fix omap_usbhs_alloc_children error handling mfd: Fix omap usbhs crash when rmmoding ehci or ohci mfd: Add ASIC3 LED support leds: Add ASIC3 LED support mfd: Update twl4030-code maintainer e-mail address mfd: Correct the name and bitmask for ab8500-gpadc BTempPullUp mfd: Add manual ab8500-gpadc batt temp activation for AB8500 3.0 mfd: Provide ab8500-core enumerators for chip cuts mfd: Check twl4030-power remove script error condition after i2cwrite mfd: Fix twl6030 irq definitions mfd: Add phoenix lite (twl6025) support to twl6030 mfd: Avoid to use constraint name in 88pm860x regulator driver mfd: Remove checking on max8925 regulator[0] mfd: Remove unused parameter from 88pm860x API mfd: Avoid to allocate 88pm860x static platform data ...
2011-05-26Merge branch 'for-linus' of ↵Linus Torvalds5-1/+117
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: RDMA/cma: Save PID of ID's owner RDMA/cma: Add support for netlink statistics export RDMA/cma: Pass QP type into rdma_create_id() RDMA: Update exported headers list RDMA/cma: Export enum cma_state in <rdma/rdma_cm.h> RDMA/nes: Add a check for strict_strtoul() RDMA/cxgb3: Don't post zero-byte read if endpoint is going away RDMA/cxgb4: Use completion objects for event blocking IB/srp: Fix integer -> pointer cast warnings IB: Add devnode methods to cm_class and umad_class IB/mad: Return EPROTONOSUPPORT when an RDMA device lacks the QP required IB/uverbs: Add devnode method to set path/mode RDMA/ucma: Add .nodename/.mode to tell userspace where to create device node RDMA: Add netlink infrastructure RDMA: Add error handling to ib_core_init()
2011-05-26Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds1-4/+4
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe fails spi/spi_s3c24xx: Use spi_bitbang_stop instead of spi_unregister_master in s3c24xx_spi_remove spi/spi_nuc900: Use spi_bitbang_stop instead of spi_unregister_master in nuc900_spi_remove spi/spi_tegra: use spi_unregister_master() instead of spi_master_put() spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove path spi: Use void pointers for data in simple SPI I/O operations spi/pl022: use cpu_relax in the busy loop spi/pl022: mark driver non-experimental spi/pl022: timeout on polled transfer v2 spi/dw_spi: improve the interrupt mode with the batch ops spi/dw_spi: change poll mode transfer from byte ops to batch ops spi/dw_spi: remove the un-necessary flush() spi/dw_spi: unify the low level read/write routines
2011-05-26Merge branch 'merge' of ↵Linus Torvalds1-10/+0
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/4xx: Adding PCIe MSI support powerpc: Fix irq_free_virt by adjusting bounds before loop powerpc/irq: Protect irq_radix_revmap_lookup against irq_free_virt powerpc/irq: Check desc in handle_one_irq and expand generic_handle_irq powerpc/irq: Always free duplicate IRQ_LEGACY hosts powerpc/irq: Remove stale and misleading comment powerpc/cell: Rename ipi functions to match current abstractions powerpc/cell: Use common smp ipi actions Remove unused MSG_ flags in linux/smp.h powerpc/pseries: Update MAX_HCALL_OPCODE to reflect page coalescing powerpc/oprofile: Handle events that raise an exception without overflowing powerpc/ftrace: Implement raw syscall tracepoints on PowerPC
2011-05-26Fix build with !HUGETLBFSLinus Torvalds1-0/+1
I stupidly broke the case of CONFIG_HUGETLBFS=n when doing the conversion to vm_flags_t in commit ca16d140af91 ("mm: don't access vm_flags as 'int'"). And my 'allyesconfig' build didn't find it, for obvious reasons.. Include <linux/mm_types.h> in <linux/hugetlb.h>. The problem could have been avoided by just turning the hugetlb_file_setup() error wrapper into a macro, but mm_types.h is a reasonable include in this file. Reported-by: Richard -rw- Weinberger <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26bug.h: Move ratelimit warn interfaces to ratelimit.hDavid S. Miller2-40/+40
As reported by Ingo Molnar, we still have configuration combinations where use of the WARN_RATELIMIT interfaces break the build because dependencies don't get met. Instead of going down the long road of trying to make it so that ratelimit.h can get included by kernel.h or asm-generic/bug.h, just move the interface into ratelimit.h and make users have to include that. Reported-by: Ingo Molnar <[email protected]> Signed-off-by: David S. Miller <[email protected]> Acked-by: Randy Dunlap <[email protected]>
2011-05-26Merge branch 'for-linus' of ↵Linus Torvalds3-0/+149
git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem: xen: cleancache shim to Xen Transcendent Memory ocfs2: add cleancache support ext4: add cleancache support btrfs: add cleancache support ext3: add cleancache support mm/fs: add hooks to support cleancache mm: cleancache core ops functions and config fs: add field to superblock to support cleancache mm/fs: cleancache documentation Fix up trivial conflict in fs/btrfs/extent_io.c due to includes
2011-05-26input: Add support for Qualcomm PMIC8XXX power keyTrilok Soni1-0/+31
Add support for PMIC8XXX power key driven over dedicated KYPD_PWR_N pin. Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Trilok Soni <[email protected]> Signed-off-by: Anirudh Ghayal <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26input: Add Qualcomm pm8xxx keypad controller driverTrilok Soni1-0/+52
Add Qualcomm PMIC8XXX based keypad controller driver supporting upto 18x8 matrix configuration. Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Trilok Soni <[email protected]> Signed-off-by: Anirudh Ghayal <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Fix ASIC3 SD Host Controller Configuration sizePaul Parsons1-0/+1
The size of the TC6380AF SD Host Controller Configuration area is 0x200 bytes (assuming registers are aligned on 32-bit boundaries), not 0x400 bytes. Source: Toshiba TC6380AF Specification sections 4.2 and 4.3.1 Signed-off-by: Paul Parsons <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26leds: Add ASIC3 LED supportPaul Parsons1-3/+19
Add LED support for the HTC ASIC3. Underlying support is provided by the mfd/asic3 and leds/leds-asic3 drivers. An example configuration is provided by the pxa/hx4700 platform. Signed-off-by: Paul Parsons <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Update twl4030-code maintainer e-mail addressPeter Ujfalusi1-1/+1
Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Provide ab8500-core enumerators for chip cutsLinus Walleij1-0/+7
Since functionality in MFD cells may need to be adjusted according to chip revision, let's enumerate them and keep track of them. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Fix twl6030 irq definitionsGraeme Gregory1-0/+1
The charger fault IRQs from the twl will in future patches be handled by a seperate IRQ handler in the charger driver than the general charger IRQ. Give them different IRQ numbers now to allow the charger driver to be merged in the future. Signed-off-by: Graeme Gregory <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Add phoenix lite (twl6025) support to twl6030Graeme Gregory1-0/+34
Phoenix Lite is based on the twl6030 family of PMICs. It has mostly the same feature set of twl6030 but with small changes. The codec block has also been removed. It also has a new charger block and new features in its ADC block. VUSB handling also differs. Signed-off-by: Graeme Gregory <[email protected]> Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Add rtc support to 88pm860xHaojian Zhuang1-0/+6
Enable rtc function in 88pm860x PMIC. Signed-off-by: Haojian Zhuang <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Add pm8xxx irq supportAbhijeet Dharmapurikar3-0/+73
Add support for the irq controller in Qualcomm 8xxx pmic. The 8xxx interrupt controller provides control for gpio and mpp configured as interrupts in addition to other subdevice interrupts. The interrupt controller also provides a way to read the real time status of an interrupt. This real time status is the only way one can get the input values of gpio and mpp lines. Signed-off-by: Abhijeet Dharmapurikar <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Add Qualcomm PMIC 8921 core driverAbhijeet Dharmapurikar2-0/+98
Add support for the Qualcomm PM8921 PMIC chip. The core driver will communicate with the PMIC chip via the MSM SSBI bus. Signed-off-by: Abhijeet Dharmapurikar <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: TWL5030 version checking in twl-coreLesly A M1-1/+16
Added API to get the TWL5030 Si version from the IDCODE register. It is used for enabling the workaround for TWL erratum 27. Signed-off-by: Lesly A M <[email protected]> Cc: Nishanth Menon <[email protected]> Cc: David Derrick <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Modifying the twl4030-power macro name Main_Ref to all capsLesly A M1-1/+1
Modifying the macro name Main_Ref to all caps(MAIN_REF). Suggested by Nishanth Menon <[email protected]> Signed-off-by: Lesly A M <[email protected]> Cc: Nishanth Menon <[email protected]> Cc: David Derrick <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Provide platform data for WM831x GPIO configurationMark Brown1-0/+4
Allow the GPIO mode of WM831x devices to be configured using platform data. Users may provide a table of GPIO register values in gpio_defaults[]. In order to allow 0 to be set explicitly out of range values are accepted and masked off, with a WM831X_GPIO_CONFIGURE define provided to set an out of range value. This can be used to configure higher numbered GPIOs or override values set in OTP for GPIOs configured using OTP. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Remove compatibility interface for WM831x specific IRQ APIMark Brown1-26/+0
The last user was removed in the merge window. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Remove mfd_dataSamuel Ortiz1-21/+0
Cell pointers are passed through device->mfd_cell and platform data is passed through the MFD cell platform_data pointer. Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Use mfd cell platform_data for ab3550 cells platform bitsSamuel Ortiz1-0/+1
With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26mfd: Add platform data pointer backSamuel Ortiz1-0/+4
Now that we have a way to pass MFD cells down to the sub drivers, we can gradually get rid of mfd_data by putting the platform pointer back in place. Signed-off-by: Samuel Ortiz <[email protected]>
2011-05-26netfilter: ipset: remove unused variable from type_pf_tdel()Jozsef Kadlecsik1-2/+2
Variable 'ret' is set in type_pf_tdel() but not used, remove. Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2011-05-26netfilter: ipset: Use proper timeout value to jiffies conversionJozsef Kadlecsik1-8/+10
Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2011-05-26Merge branch 'for_linus' of ↵Linus Torvalds1-2/+6
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (61 commits) jbd2: Add MAINTAINERS entry jbd2: fix a potential leak of a journal_head on an error path ext4: teach ext4_ext_split to calculate extents efficiently ext4: Convert ext4 to new truncate calling convention ext4: do not normalize block requests from fallocate() ext4: enable "punch hole" functionality ext4: add "punch hole" flag to ext4_map_blocks() ext4: punch out extents ext4: add new function ext4_block_zero_page_range() ext4: add flag to ext4_has_free_blocks ext4: reserve inodes and feature code for 'quota' feature ext4: add support for multiple mount protection ext4: ensure f_bfree returned by ext4_statfs() is non-negative ext4: protect bb_first_free in ext4_trim_all_free() with group lock ext4: only load buddy bitmap in ext4_trim_fs() when it is needed jbd2: Fix comment to match the code in jbd2__journal_start() ext4: fix waiting and sending of a barrier in ext4_sync_file() jbd2: Add function jbd2_trans_will_send_data_barrier() jbd2: fix sending of data flush on journal commit ext4: fix ext4_ext_fiemap_cb() to handle blocks before request range correctly ...
2011-05-26Merge branch 'for-linus' of ↵Linus Torvalds1-0/+16
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (25 commits) cifs: remove unnecessary dentry_unhash on rmdir/rename_dir ocfs2: remove unnecessary dentry_unhash on rmdir/rename_dir exofs: remove unnecessary dentry_unhash on rmdir/rename_dir nfs: remove unnecessary dentry_unhash on rmdir/rename_dir ext2: remove unnecessary dentry_unhash on rmdir/rename_dir ext3: remove unnecessary dentry_unhash on rmdir/rename_dir ext4: remove unnecessary dentry_unhash on rmdir/rename_dir btrfs: remove unnecessary dentry_unhash in rmdir/rename_dir ceph: remove unnecessary dentry_unhash calls vfs: clean up vfs_rename_other vfs: clean up vfs_rename_dir vfs: clean up vfs_rmdir vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOVE filesystems libfs: drop unneeded dentry_unhash vfs: update dentry_unhash() comment vfs: push dentry_unhash on rename_dir into file systems vfs: push dentry_unhash on rmdir into file systems vfs: remove dget() from dentry_unhash() vfs: dentry_unhash immediately prior to rmdir vfs: Block mmapped writes while the fs is frozen ...
2011-05-26mm: don't access vm_flags as 'int'KOSAKI Motohiro4-8/+10
The type of vma->vm_flags is 'unsigned long'. Neither 'int' nor 'unsigned int'. This patch fixes such misuse. Signed-off-by: KOSAKI Motohiro <[email protected]> [ Changed to use a typedef - we'll extend it to cover more cases later, since there has been discussion about making it a 64-bit type.. - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2011-05-26xen: cleancache shim to Xen Transcendent MemoryDan Magenheimer1-0/+22
This patch provides a shim between the kernel-internal cleancache API (see Documentation/mm/cleancache.txt) and the Xen Transcendent Memory ABI (see http://oss.oracle.com/projects/tmem). Xen tmem provides "hypervisor RAM" as an ephemeral page-oriented pseudo-RAM store for cleancache pages, shared cleancache pages, and frontswap pages. Tmem provides enterprise-quality concurrency, full save/restore and live migration support, compression and deduplication. A presentation showing up to 8% faster performance and up to 52% reduction in sectors read on a kernel compile workload, despite aggressive in-kernel page reclamation ("self-ballooning") can be found at: http://oss.oracle.com/projects/tmem/dist/documentation/presentations/TranscendentMemoryXenSummit2010.pdf Signed-off-by: Dan Magenheimer <[email protected]> Reviewed-by: Jeremy Fitzhardinge <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Rik Van Riel <[email protected]> Cc: Jan Beulich <[email protected]> Cc: Chris Mason <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Ted Ts'o <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Nitin Gupta <[email protected]>
2011-05-26mm: cleancache core ops functions and configDan Magenheimer1-0/+122
This third patch of eight in this cleancache series provides the core code for cleancache that interfaces between the hooks in VFS and individual filesystems and a cleancache backend. It also includes build and config patches. Two new files are added: mm/cleancache.c and include/linux/cleancache.h. Note that CONFIG_CLEANCACHE can default to on; in systems that do not provide a cleancache backend, all hooks devolve to a simple check of a global enable flag, so performance impact should be negligible but can be reduced to zero impact if config'ed off. However for this first commit, it defaults to off. Details and a FAQ can be found in Documentation/vm/cleancache.txt Credits: Cleancache_ops design derived from Jeremy Fitzhardinge design for tmem [v8: [email protected]: fix exportfs call affecting btrfs] [v8: [email protected]: use static inline function, not macro] [v7: [email protected]: cleanup sysfs and remove cleancache prefix] [v6: [email protected]: robustly handle buggy fs encode_fh actor definition] [v5: [email protected]: clean up global usage and static var names] [v5: [email protected]: simplify init hook and any future fs init changes] [v5: [email protected]: cleaner non-global interface for ops registration] [v4: [email protected]: interface must support exportfs FS's] [v4: [email protected]: interface must support 64-bit FS on 32-bit kernel] [v3: [email protected]: use one ops struct to avoid pointer hops] [v3: [email protected]: document and ensure PageLocked reqts are met] [v3: [email protected]: fix success/fail codes, change funcs to void] [v2: [email protected]: use sane types] Signed-off-by: Dan Magenheimer <[email protected]> Reviewed-by: Jeremy Fitzhardinge <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Al Viro <[email protected]> Acked-by: Andrew Morton <[email protected]> Acked-by: Nitin Gupta <[email protected]> Acked-by: Minchan Kim <[email protected]> Acked-by: Andreas Dilger <[email protected]> Acked-by: Jan Beulich <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Rik Van Riel <[email protected]> Cc: Chris Mason <[email protected]> Cc: Ted Ts'o <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]>
2011-05-26fs: add field to superblock to support cleancacheDan Magenheimer1-0/+5
This second patch of eight in this cleancache series adds a field to the generic superblock to squirrel away a pool identifier that is dynamically provided by cleancache-enabled filesystems at mount time to uniquely identify files and pages belonging to this mounted filesystem. Details and a FAQ can be found in Documentation/vm/cleancache.txt [v8: trivial merge conflict update] Signed-off-by: Dan Magenheimer <[email protected]> Reviewed-by: Jeremy Fitzhardinge <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Al Viro <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Rik Van Riel <[email protected]> Cc: Jan Beulich <[email protected]> Cc: Chris Mason <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Ted Ts'o <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Nitin Gupta <[email protected]>
2011-05-26Merge branch 'linus' into x86/urgentIngo Molnar85-395/+3330
Merge reason: we want to queue up a dependent patch. Signed-off-by: Ingo Molnar <[email protected]>
2011-05-26vfs: Block mmapped writes while the fs is frozenJan Kara1-0/+2
We should not allow file modification via mmap while the filesystem is frozen. So block in block_page_mkwrite() while the filesystem is frozen. We cannot do the blocking wait in __block_page_mkwrite() since e.g. ext4 will want to call that function with transaction started in some cases and that would deadlock. But we can at least do the non-blocking reliable check in __block_page_mkwrite() which is the hardest part anyway. We have to check for frozen filesystem with the page marked dirty and under page lock with which we then return from ->page_mkwrite(). Only that way we cannot race with writeback done by freezing code - either we mark the page dirty after the writeback has started, see freezing in progress and block, or writeback will wait for our page lock which is released only when the fault is done and then writeback will writeout and writeprotect the page again. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-26vfs: Create __block_page_mkwrite() helper passing error values backJan Kara1-0/+14
Create __block_page_mkwrite() helper which does all what block_page_mkwrite() does except that it passes back errors from __block_write_begin / block_commit_write calls. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-26ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEMWill Deacon1-0/+2
In commit eb33575c ("[ARM] Double check memmap is actually valid with a memmap has unexpected holes V2"), a new function, memmap_valid_within, was introduced to mmzone.h so that holes in the memmap which pass pfn_valid in SPARSEMEM configurations can be detected and avoided. The fix to this problem checks that the pfn <-> page linkages are correct by calculating the page for the pfn and then checking that page_to_pfn on that page returns the original pfn. Unfortunately, in SPARSEMEM configurations, this results in reading from the page flags to determine the correct section. Since the memmap here has been freed, junk is read from memory and the check is no longer robust. In the best case, reading from /proc/pagetypeinfo will give you the wrong answer. In the worst case, you get SEGVs, Kernel OOPses and hung CPUs. Furthermore, ioremap implementations that use pfn_valid to disallow the remapping of normal memory will break. This patch allows architectures to provide their own pfn_valid function instead of using the default implementation used by sparsemem. The architecture-specific version is aware of the memmap state and will return false when passed a pfn for a freed page within a valid section. Acked-by: Mel Gorman <[email protected]> Acked-by: Catalin Marinas <[email protected]> Tested-by: H Hartley Sweeten <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-05-26Remove unused MSG_ flags in linux/smp.hMilton Miller1-10/+0
Now that powerpc has removed its use of MSG_ALL_BUT_SELF and MSG_ALL all these MSG_ flags are unused. Signed-off-by: Milton Miller <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-05-25ftrace: Add internal recursive checksSteven Rostedt1-1/+1
Witold reported a reboot caused by the selftests of the dynamic function tracer. He sent me a config and I used ktest to do a config_bisect on it (as my config did not cause the crash). It pointed out that the problem config was CONFIG_PROVE_RCU. What happened was that if multiple callbacks are attached to the function tracer, we iterate a list of callbacks. Because the list is managed by synchronize_sched() and preempt_disable, the access to the pointers uses rcu_dereference_raw(). When PROVE_RCU is enabled, the rcu_dereference_raw() calls some debugging functions, which happen to be traced. The tracing of the debug function would then call rcu_dereference_raw() which would then call the debug function and then... well you get the idea. I first wrote two different patches to solve this bug. 1) add a __rcu_dereference_raw() that would not do any checks. 2) add notrace to the offending debug functions. Both of these patches worked. Talking with Paul McKenney on IRC, he suggested to add recursion detection instead. This seemed to be a better solution, so I decided to implement it. As the task_struct already has a trace_recursion to detect recursion in the ring buffer, and that has a very small number it allows, I decided to use that same variable to add flags that can detect the recursion inside the infrastructure of the function tracer. I plan to change it so that the task struct bit can be checked in mcount, but as that requires changes to all archs, I will hold that off to the next merge window. Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Paul E. McKenney <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Reported-by: Witold Baryluk <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2011-05-25tracing: Update btrfs's tracepoints to use u64 interfaceliubo1-2/+2
To avoid 64->32 truncating WARNING, update btrfs's tracepoints. Signed-off-by: Liu Bo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Steven Rostedt <[email protected]>
2011-05-25tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machineliubo2-0/+25
Filesystem, like Btrfs, has some "ULL" macros, and when these macros are passed to tracepoints'__print_symbolic(), there will be 64->32 truncate WARNINGS during compiling on 32bit box. Signed-off-by: Liu Bo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Steven Rostedt <[email protected]>