1. 16 1月, 2016 11 次提交
    • L
      Merge tag 'md/4.5' of git://neil.brown.name/md · 3c28c9cc
      Linus Torvalds 提交于
      Pull md updates from Neil Brown:
       "Mostly clustered-raid1 and raid5 journal updates.  one Y2038 fix and
        other minor stuff.
      
        One patch removes me from the MAINTAINERS file and adds a record of my
        md maintainership to Credits"
      
      Many thanks to Neil, who has been around for a _looong_ time.
      
      * tag 'md/4.5' of git://neil.brown.name/md: (26 commits)
        md/raid: only permit hot-add of compatible integrity profiles
        Remove myself as MD Maintainer, and add to Credits.
        raid5-cache: handle journal hotadd in quiesce
        MD: add journal with array suspended
        md: set MD_HAS_JOURNAL in correct places
        md: Remove 'ready' field from mddev.
        md: remove unnecesary md_new_event_inintr
        raid5: allow r5l_io_unit allocations to fail
        raid5-cache: use a mempool for the metadata block
        raid5-cache: use a bio_set
        raid5-cache: add journal hot add/remove support
        drivers: md: use ktime_get_real_seconds()
        md: avoid warning for 32-bit sector_t
        raid5-cache: free meta_page earlier
        raid5-cache: simplify r5l_move_io_unit_list
        md: update comment for md_allow_write
        md-cluster: update comments for MD_CLUSTER_SEND_LOCKED_ALREADY
        md-cluster: Protect communication with mutexes
        md-cluster: Defer MD reloading to mddev->thread
        md-cluster: update the documentation
        ...
      3c28c9cc
    • L
      Merge tag 'regulator-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 4b43ea2a
      Linus Torvalds 提交于
      Pull regulator updates from Mark Brown:
       "Aside from a fix for a spurious warning (which caused more problems
        than it fixed in the fixing really) this is all driver updates,
        including new drivers for Dialog PV88060/90 and TI LM363x and TPS65086
        devices.  The qcom_smd driver has had PM8916 and PMA8084 support
        added"
      
      * tag 'regulator-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (36 commits)
        regulator: core: remove some dead code
        regulator: core: use dev_to_rdev
        regulator: lp872x: Get rid of duplicate reference to DVS GPIO
        regulator: lp872x: Add missing of_match in regulators descriptions
        regulator: axp20x: Fix GPIO LDO enable value for AXP22x
        regulator: lp8788: constify regulator_ops structures
        regulator: wm8*: constify regulator_ops structures
        regulator: da9*: constify regulator_ops structures
        regulator: mt6311: Use REGCACHE_RBTREE
        regulator: tps65917/palmas: Add bypass ops for LDOs with bypass capability
        regulator: qcom-smd: Add support for PMA8084
        regulator: qcom-smd: Add PM8916 support
        soc: qcom: documentation: Update SMD/RPM Docs
        regulator: pv88090: logical vs bitwise AND typo
        regulator: pv88090: Fix irq leak
        regulator: pv88090: new regulator driver
        regulator: wm831x-ldo: Use platform_register/unregister_drivers()
        regulator: wm831x-dcdc: Use platform_register/unregister_drivers()
        regulator: lp8788-ldo: Use platform_register/unregister_drivers()
        regulator: core: Fix nested locking of supplies
        ...
      4b43ea2a
    • L
      Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 7aca74e7
      Linus Torvalds 提交于
      Pull mailbox fixlet from Jussi Brar.
      
      * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: constify mbox_chan_ops structure
      7aca74e7
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 1d3671df
      Linus Torvalds 提交于
      Pull UDF fixes and quota cleanups from Jan Kara:
       "Several UDF fixes and some minor quota cleanups"
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Check output buffer length when converting name to CS0
        udf: Prevent buffer overrun with multi-byte characters
        quota: constify qtree_fmt_operations structures
        udf: avoid uninitialized variable use
        udf: Fix lost indirect extent block
        udf: Factor out code for creating indirect extent
        udf: limit the maximum number of indirect extents in a row
        udf: limit the maximum number of TD redirections
        fs: make quota/dquot.c explicitly non-modular
        fs: make quota/netlink.c explicitly non-modular
      1d3671df
    • L
      Merge branch 'akpm' (patches from Andrew) · 875fc4f5
      Linus Torvalds 提交于
      Merge first patch-bomb from Andrew Morton:
      
       - A few hotfixes which missed 4.4 becasue I was asleep.  cc'ed to
         -stable
      
       - A few misc fixes
      
       - OCFS2 updates
      
       - Part of MM.  Including pretty large changes to page-flags handling
         and to thp management which have been buffered up for 2-3 cycles now.
      
        I have a lot of MM material this time.
      
      [ It turns out the THP part wasn't quite ready, so that got dropped from
        this series  - Linus ]
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits)
        zsmalloc: reorganize struct size_class to pack 4 bytes hole
        mm/zbud.c: use list_last_entry() instead of list_tail_entry()
        zram/zcomp: do not zero out zcomp private pages
        zram: pass gfp from zcomp frontend to backend
        zram: try vmalloc() after kmalloc()
        zram/zcomp: use GFP_NOIO to allocate streams
        mm: add tracepoint for scanning pages
        drivers/base/memory.c: fix kernel warning during memory hotplug on ppc64
        mm/page_isolation: use macro to judge the alignment
        mm: fix noisy sparse warning in LIBCFS_ALLOC_PRE()
        mm: rework virtual memory accounting
        include/linux/memblock.h: fix ordering of 'flags' argument in comments
        mm: move lru_to_page to mm_inline.h
        Documentation/filesystems: describe the shared memory usage/accounting
        memory-hotplug: don't BUG() in register_memory_resource()
        hugetlb: make mm and fs code explicitly non-modular
        mm/swapfile.c: use list_for_each_entry_safe in free_swap_count_continuations
        mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
        mm: make sure isolate_lru_page() is never called for tail page
        vmstat: make vmstat_updater deferrable again and shut down on idle
        ...
      875fc4f5
    • W
      zsmalloc: reorganize struct size_class to pack 4 bytes hole · 7dfa4612
      Weijie Yang 提交于
      Reoder the pages_per_zspage field in struct size_class which can
      eliminate the 4 bytes hole between it and stats field.
      Signed-off-by: NWeijie Yang <weijie.yang@samsung.com>
      Reviewed-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7dfa4612
    • G
      mm/zbud.c: use list_last_entry() instead of list_tail_entry() · f58fb5e7
      Geliang Tang 提交于
      list_last_entry*( has been defined in list.h, so replace
      list_tail_entry() with it.
      Signed-off-by: NGeliang Tang <geliangtang@163.com>
      Cc: Seth Jennings <sjennings@variantweb.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f58fb5e7
    • S
      zram/zcomp: do not zero out zcomp private pages · e02d238c
      Sergey Senozhatsky 提交于
      Do not __GFP_ZERO allocated zcomp ->private pages.  We keep allocated
      streams around and use them for read/write requests, so we supply a
      zeroed out ->private to compression algorithm as a scratch buffer only
      once -- the first time we use that stream.  For the rest of IO requests
      served by this stream ->private usually contains some temporarily data
      from the previous requests.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e02d238c
    • M
      zram: pass gfp from zcomp frontend to backend · 75d8947a
      Minchan Kim 提交于
      Each zcomp backend uses own gfp flag but it's pointless because the
      context they could be called is driven by upper layer(ie, zcomp
      frontend).  As well, zcomp frondend could call them in different
      context.  One context(ie, zram init part) is it should be better to make
      sure successful allocation other context(ie, further stream allocation
      part for accelarating I/O speed) is just optional so let's pass gfp down
      from driver (ie, zcomp frontend) like normal MM convention.
      
      [sergey.senozhatsky@gmail.com: add missing __vmalloc zero and highmem gfps]
      Signed-off-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      75d8947a
    • K
      zram: try vmalloc() after kmalloc() · d913897a
      Kyeongdon Kim 提交于
      When we're using LZ4 multi compression streams for zram swap, we found
      out page allocation failure message in system running test.  That was
      not only once, but a few(2 - 5 times per test).  Also, some failure
      cases were continually occurring to try allocation order 3.
      
      In order to make parallel compression private data, we should call
      kzalloc() with order 2/3 in runtime(lzo/lz4).  But if there is no order
      2/3 size memory to allocate in that time, page allocation fails.  This
      patch makes to use vmalloc() as fallback of kmalloc(), this prevents
      page alloc failure warning.
      
      After using this, we never found warning message in running test, also
      It could reduce process startup latency about 60-120ms in each case.
      
      For reference a call trace :
      
          Binder_1: page allocation failure: order:3, mode:0x10c0d0
          CPU: 0 PID: 424 Comm: Binder_1 Tainted: GW 3.10.49-perf-g991d02b-dirty #20
          Call trace:
            dump_backtrace+0x0/0x270
            show_stack+0x10/0x1c
            dump_stack+0x1c/0x28
            warn_alloc_failed+0xfc/0x11c
            __alloc_pages_nodemask+0x724/0x7f0
            __get_free_pages+0x14/0x5c
            kmalloc_order_trace+0x38/0xd8
            zcomp_lz4_create+0x2c/0x38
            zcomp_strm_alloc+0x34/0x78
            zcomp_strm_multi_find+0x124/0x1ec
            zcomp_strm_find+0xc/0x18
            zram_bvec_rw+0x2fc/0x780
            zram_make_request+0x25c/0x2d4
            generic_make_request+0x80/0xbc
            submit_bio+0xa4/0x15c
            __swap_writepage+0x218/0x230
            swap_writepage+0x3c/0x4c
            shrink_page_list+0x51c/0x8d0
            shrink_inactive_list+0x3f8/0x60c
            shrink_lruvec+0x33c/0x4cc
            shrink_zone+0x3c/0x100
            try_to_free_pages+0x2b8/0x54c
            __alloc_pages_nodemask+0x514/0x7f0
            __get_free_pages+0x14/0x5c
            proc_info_read+0x50/0xe4
            vfs_read+0xa0/0x12c
            SyS_read+0x44/0x74
          DMA: 3397*4kB (MC) 26*8kB (RC) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB
               0*512kB 0*1024kB 0*2048kB 0*4096kB = 13796kB
      
      [minchan@kernel.org: change vmalloc gfp and adding comment about gfp]
      [sergey.senozhatsky@gmail.com: tweak comments and styles]
      Signed-off-by: NKyeongdon Kim <kyeongdon.kim@lge.com>
      Signed-off-by: NMinchan Kim <minchan@kernel.org>
      Acked-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d913897a
    • S
      zram/zcomp: use GFP_NOIO to allocate streams · 3d5fe03a
      Sergey Senozhatsky 提交于
      We can end up allocating a new compression stream with GFP_KERNEL from
      within the IO path, which may result is nested (recursive) IO
      operations.  That can introduce problems if the IO path in question is a
      reclaimer, holding some locks that will deadlock nested IOs.
      
      Allocate streams and working memory using GFP_NOIO flag, forbidding
      recursive IO and FS operations.
      
      An example:
      
        inconsistent {IN-RECLAIM_FS-W} -> {RECLAIM_FS-ON-W} usage.
        git/20158 [HC0[0]:SC0[0]:HE1:SE1] takes:
         (jbd2_handle){+.+.?.}, at:  start_this_handle+0x4ca/0x555
        {IN-RECLAIM_FS-W} state was registered at:
           __lock_acquire+0x8da/0x117b
           lock_acquire+0x10c/0x1a7
           start_this_handle+0x52d/0x555
           jbd2__journal_start+0xb4/0x237
           __ext4_journal_start_sb+0x108/0x17e
           ext4_dirty_inode+0x32/0x61
           __mark_inode_dirty+0x16b/0x60c
           iput+0x11e/0x274
           __dentry_kill+0x148/0x1b8
           shrink_dentry_list+0x274/0x44a
           prune_dcache_sb+0x4a/0x55
           super_cache_scan+0xfc/0x176
           shrink_slab.part.14.constprop.25+0x2a2/0x4d3
           shrink_zone+0x74/0x140
           kswapd+0x6b7/0x930
           kthread+0x107/0x10f
           ret_from_fork+0x3f/0x70
        irq event stamp: 138297
        hardirqs last  enabled at (138297):  debug_check_no_locks_freed+0x113/0x12f
        hardirqs last disabled at (138296):  debug_check_no_locks_freed+0x33/0x12f
        softirqs last  enabled at (137818):  __do_softirq+0x2d3/0x3e9
        softirqs last disabled at (137813):  irq_exit+0x41/0x95
      
                     other info that might help us debug this:
         Possible unsafe locking scenario:
               CPU0
               ----
          lock(jbd2_handle);
          <Interrupt>
            lock(jbd2_handle);
      
                      *** DEADLOCK ***
        5 locks held by git/20158:
         #0:  (sb_writers#7){.+.+.+}, at: [<ffffffff81155411>] mnt_want_write+0x24/0x4b
         #1:  (&type->i_mutex_dir_key#2/1){+.+.+.}, at: [<ffffffff81145087>] lock_rename+0xd9/0xe3
         #2:  (&sb->s_type->i_mutex_key#11){+.+.+.}, at: [<ffffffff8114f8e2>] lock_two_nondirectories+0x3f/0x6b
         #3:  (&sb->s_type->i_mutex_key#11/4){+.+.+.}, at: [<ffffffff8114f909>] lock_two_nondirectories+0x66/0x6b
         #4:  (jbd2_handle){+.+.?.}, at: [<ffffffff811e31db>] start_this_handle+0x4ca/0x555
      
                     stack backtrace:
        CPU: 2 PID: 20158 Comm: git Not tainted 4.1.0-rc7-next-20150615-dbg-00016-g8bdf555-dirty #211
        Call Trace:
          dump_stack+0x4c/0x6e
          mark_lock+0x384/0x56d
          mark_held_locks+0x5f/0x76
          lockdep_trace_alloc+0xb2/0xb5
          kmem_cache_alloc_trace+0x32/0x1e2
          zcomp_strm_alloc+0x25/0x73 [zram]
          zcomp_strm_multi_find+0xe7/0x173 [zram]
          zcomp_strm_find+0xc/0xe [zram]
          zram_bvec_rw+0x2ca/0x7e0 [zram]
          zram_make_request+0x1fa/0x301 [zram]
          generic_make_request+0x9c/0xdb
          submit_bio+0xf7/0x120
          ext4_io_submit+0x2e/0x43
          ext4_bio_write_page+0x1b7/0x300
          mpage_submit_page+0x60/0x77
          mpage_map_and_submit_buffers+0x10f/0x21d
          ext4_writepages+0xc8c/0xe1b
          do_writepages+0x23/0x2c
          __filemap_fdatawrite_range+0x84/0x8b
          filemap_flush+0x1c/0x1e
          ext4_alloc_da_blocks+0xb8/0x117
          ext4_rename+0x132/0x6dc
          ? mark_held_locks+0x5f/0x76
          ext4_rename2+0x29/0x2b
          vfs_rename+0x540/0x636
          SyS_renameat2+0x359/0x44d
          SyS_rename+0x1e/0x20
          entry_SYSCALL_64_fastpath+0x12/0x6f
      
      [minchan@kernel.org: add stable mark]
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: NMinchan Kim <minchan@kernel.org>
      Cc: Kyeongdon Kim <kyeongdon.kim@lge.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3d5fe03a
  2. 15 1月, 2016 29 次提交