summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-15Add linux-next specific files for 20141015next-20141015Stephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2014-10-15Merge branch 'akpm/master'Stephen Rothwell
2014-10-15mm: add strictlimit knobMaxim Patlasov
The "strictlimit" feature was introduced to enforce per-bdi dirty limits for FUSE which sets bdi max_ratio to 1% by default: http://article.gmane.org/gmane.linux.kernel.mm/105809 However the feature can be useful for other relatively slow or untrusted BDIs like USB flash drives and DVD+RW. The patch adds a knob to enable the feature: echo 1 > /sys/class/bdi/X:Y/strictlimit Being enabled, the feature enforces bdi max_ratio limit even if global (10%) dirty limit is not reached. Of course, the effect is not visible until /sys/class/bdi/X:Y/max_ratio is decreased to some reasonable value. Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Theodore Ts'o <tytso@mit.edu> Cc: "Artem S. Tashkinov" <t.artem@lycos.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Jan Kara <jack@suse.cz> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15drivers/w1/w1_int.c: call put_device if device_register failsLevente Kurusa
Currently, memsetting and kfreeing the device is bad behaviour. The device will have a reference count of 1 and hence can cause trouble because it has kfree'd. Proper way to handle a failed device_register is to call put_device right after it fails. Signed-off-by: Levente Kurusa <levex@linux.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15mm: replace remap_file_pages() syscall with emulationKirill A. Shutemov
remap_file_pages(2) was invented to be able efficiently map parts of huge file into limited 32-bit virtual address space such as in database workloads. Nonlinear mappings are pain to support and it seems there's no legitimate use-cases nowadays since 64-bit systems are widely available. Let's drop it and get rid of all these special-cased code. The patch replaces the syscall with emulation which creates new VMA on each remap_file_pages(), unless they it can be merged with an adjacent one. I didn't find *any* real code that uses remap_file_pages(2) to test emulation impact on. I've checked Debian code search and source of all packages in ALT Linux. No real users: libc wrappers, mentions in strace, gdb, valgrind and this kind of stuff. There are few basic tests in LTP for the syscall. They work just fine with emulation. To test performance impact, I've written small test case which demonstrate pretty much worst case scenario: map 4G shmfs file, write to begin of every page pgoff of the page, remap pages in reverse order, read every page. The test creates 1 million of VMAs if emulation is in use, so I had to set vm.max_map_count to 1100000 to avoid -ENOMEM. Before: 23.3 ( +- 4.31% ) seconds After: 43.9 ( +- 0.85% ) seconds Slowdown: 1.88x I believe we can live with that. Test case: #define _GNU_SOURCE #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <sys/mman.h> #define MB (1024UL * 1024) #define SIZE (4096 * MB) int main(int argc, char **argv) { unsigned long *p; long i, pass; for (pass = 0; pass < 10; pass++) { p = mmap(NULL, SIZE, PROT_READ|PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { perror("mmap"); return -1; } for (i = 0; i < SIZE / 4096; i++) p[i * 4096 / sizeof(*p)] = i; for (i = 0; i < SIZE / 4096; i++) { if (remap_file_pages(p + i * 4096 / sizeof(*p), 4096, 0, (SIZE - 4096 * (i + 1)) >> 12, 0)) { perror("remap_file_pages"); return -1; } } for (i = SIZE / 4096 - 1; i >= 0; i--) assert(p[i * 4096 / sizeof(*p)] == SIZE / 4096 - i - 1); munmap(p, SIZE); } return 0; } [akpm@linux-foundation.org: fix spello] [sasha.levin@oracle.com: initialize populate before usage] [sasha.levin@oracle.com: grab file ref to prevent race while mmaping] Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Dave Jones <davej@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Armin Rigo <arigo@tunes.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15Documentation/filesystems/vfat.txt: update the limitation for fat fallocateNamjae Jeon
Update the limitation for fat fallocate. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15fat: permit to return phy block number by fibmap in fallocated regionNamjae Jeon
Make the fibmap call the return the proper physical block number for any offset request in the fallocated range. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15fat: skip cluster allocation on fallocated regionNamjae Jeon
Skip new cluster allocation after checking i_disksize in _fat_get_block. because the blocks are already allocated in fallocated region. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15fat: add fat_fallocate operationNamjae Jeon
Implement preallocation via the fallocate syscall on VFAT partitions. This patch is based on an earlier patch of the same name which had some issues detailed below and did not get accepted. Refer https://lkml.org/lkml/2007/12/22/130. a) The preallocated space was not persistent when the FALLOC_FL_KEEP_SIZE flag was set. It will deallocate cluster at evict time. b) There was no need to zero out the clusters when the flag was set Instead of doing an expanding truncate, just allocate clusters and add them to the fat chain. This reduces preallocation time. Compatibility with windows: There are no issues when FALLOC_FL_KEEP_SIZE is not set because it just does an expanding truncate. Thus reading from the preallocated area on windows returns null until data is written to it. When a file with preallocated area using the FALLOC_FL_KEEP_SIZE was written to on windows, the windows driver freed-up the preallocated clusters and allocated new clusters for the new data. The freed up clusters gets reflected in the free space available for the partition which can be seen from the Volume properties. The windows chkdsk tool also does not report any errors on a disk containing files with preallocated space. And there is also no issue using linux fat fsck. because discard preallocated clusters at repair time. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15fat: add i_disksize to represent uninitialized sizeNamjae Jeon
This patchset provides support for doing fallocate operation on FAT filesystem. This patch (of 5): Add i_disksize to represent uninitialized allocated size. And mmu_private represent initialized allocated size. i_disksize - is always kept cluster size aligned mmu_private - is normally block size aligned Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15drivers/gpio/gpio-zevio.c: fix buildAndrew Morton
Unbreak i386 allmodconfig. This is a hack - please fix properly ;) Cc: Fabian Vogt <fabian@ritter-vogt.de> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-10-15Merge branch 'akpm-current/current'Stephen Rothwell
Conflicts: arch/arm64/mm/dma-mapping.c drivers/base/dma-contiguous.c drivers/clk/Kconfig fs/proc/task_mmu.c mm/slab.c
2014-10-15Merge remote-tracking branch 'kselftest/next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'llvmlinux/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'aio/master'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'lzo-update/lzo-update'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'random/dev'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'clk/clk-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'userns/for-next'Stephen Rothwell
Conflicts: fs/nfs/client.c
2014-10-15Merge remote-tracking branch 'dma-buf/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'pwm/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'vhost/linux-next'Stephen Rothwell
Conflicts: drivers/vhost/net.c
2014-10-15Merge remote-tracking branch 'target-updates/for-next'Stephen Rothwell
Conflicts: drivers/scsi/qla2xxx/qla_target.c
2014-10-15Merge remote-tracking branch 'scsi/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'cgroup/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'leds/for-next'Stephen Rothwell
Conflicts: drivers/leds/leds-gpio.c
2014-10-15Merge remote-tracking branch 'hsi/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'regmap/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'percpu/for-next'Stephen Rothwell
Conflicts: arch/s390/include/asm/cputime.h arch/s390/kernel/irq.c arch/s390/kernel/processor.c arch/s390/kernel/vtime.c kernel/irq_work.c
2014-10-15Merge remote-tracking branch 'kvm-arm/next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'ftrace/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'tiny/tiny/next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'irqchip/irqchip/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'tip/auto-latest'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'spi/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'mailbox/mailbox-for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'audit/master'Stephen Rothwell
Conflicts: arch/arm64/kernel/ptrace.c arch/x86/kernel/entry_64.S arch/x86/kernel/ptrace.c
2014-10-15Merge remote-tracking branch 'iommu/next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'watchdog/master'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'regulator/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'omap_dss2/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'battery/master'Stephen Rothwell
Conflicts: drivers/power/reset/Kconfig drivers/power/reset/Makefile
2014-10-15Merge remote-tracking branch 'mfd/for-mfd-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'md/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'kgdb/kgdb-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'device-mapper/for-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'block/for-next'Stephen Rothwell
Conflicts: block/blk-core.c
2014-10-15Merge remote-tracking branch 'input/next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'virtio/virtio-next'Stephen Rothwell
2014-10-15Merge remote-tracking branch 'modules/modules-next'Stephen Rothwell