1. 25 2月, 2017 4 次提交
  2. 24 2月, 2017 1 次提交
  3. 23 2月, 2017 4 次提交
  4. 22 2月, 2017 1 次提交
    • K
      usercopy: Add tests for all get_user() sizes · 4c5d7bc6
      Kees Cook 提交于
      The existing test was only exercising native unsigned long size
      get_user(). For completeness, we should check all sizes. But we
      must skip some 32-bit architectures that don't implement a 64-bit
      get_user().
      
      These new tests actually uncovered a bug in ARM's 64-bit get_user()
      zeroing.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      4c5d7bc6
  5. 18 2月, 2017 1 次提交
    • H
      rhashtable: Add nested tables · da20420f
      Herbert Xu 提交于
      This patch adds code that handles GFP_ATOMIC kmalloc failure on
      insertion.  As we cannot use vmalloc, we solve it by making our
      hash table nested.  That is, we allocate single pages at each level
      and reach our desired table size by nesting them.
      
      When a nested table is created, only a single page is allocated
      at the top-level.  Lower levels are allocated on demand during
      insertion.  Therefore for each insertion to succeed, only two
      (non-consecutive) pages are needed.
      
      After a nested table is created, a rehash will be scheduled in
      order to switch to a vmalloced table as soon as possible.  Also,
      the rehash code will never rehash into a nested table.  If we
      detect a nested table during a rehash, the rehash will be aborted
      and a new rehash will be scheduled.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da20420f
  6. 17 2月, 2017 2 次提交
  7. 16 2月, 2017 1 次提交
  8. 14 2月, 2017 1 次提交
    • H
      rhashtable: Add nested tables · 40137906
      Herbert Xu 提交于
      This patch adds code that handles GFP_ATOMIC kmalloc failure on
      insertion.  As we cannot use vmalloc, we solve it by making our
      hash table nested.  That is, we allocate single pages at each level
      and reach our desired table size by nesting them.
      
      When a nested table is created, only a single page is allocated
      at the top-level.  Lower levels are allocated on demand during
      insertion.  Therefore for each insertion to succeed, only two
      (non-consecutive) pages are needed.
      
      After a nested table is created, a rehash will be scheduled in
      order to switch to a vmalloced table as soon as possible.  Also,
      the rehash code will never rehash into a nested table.  If we
      detect a nested table during a rehash, the rehash will be aborted
      and a new rehash will be scheduled.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40137906
  9. 10 2月, 2017 3 次提交
  10. 08 2月, 2017 1 次提交
  11. 06 2月, 2017 1 次提交
    • W
      debugobjects: Reduce contention on the global pool_lock · 858274b6
      Waiman Long 提交于
      On a large SMP system with many CPUs, the global pool_lock may become
      a performance bottleneck as all the CPUs that need to allocate or
      free debug objects have to take the lock. That can sometimes cause
      soft lockups like:
      
       NMI watchdog: BUG: soft lockup - CPU#35 stuck for 22s! [rcuos/1:21]
       ...
       RIP: 0010:[<ffffffff817c216b>]  [<ffffffff817c216b>]
      	_raw_spin_unlock_irqrestore+0x3b/0x60
       ...
       Call Trace:
        [<ffffffff813f40d1>] free_object+0x81/0xb0
        [<ffffffff813f4f33>] debug_check_no_obj_freed+0x193/0x220
        [<ffffffff81101a59>] ? trace_hardirqs_on_caller+0xf9/0x1c0
        [<ffffffff81284996>] ? file_free_rcu+0x36/0x60
        [<ffffffff81251712>] kmem_cache_free+0xd2/0x380
        [<ffffffff81284960>] ? fput+0x90/0x90
        [<ffffffff81284996>] file_free_rcu+0x36/0x60
        [<ffffffff81124c23>] rcu_nocb_kthread+0x1b3/0x550
        [<ffffffff81124b71>] ? rcu_nocb_kthread+0x101/0x550
        [<ffffffff81124a70>] ? sync_exp_work_done.constprop.63+0x50/0x50
        [<ffffffff810c59d1>] kthread+0x101/0x120
        [<ffffffff81101a59>] ? trace_hardirqs_on_caller+0xf9/0x1c0
        [<ffffffff817c2d32>] ret_from_fork+0x22/0x50
      
      To reduce the amount of contention on the pool_lock, the actual
      kmem_cache_free() of the debug objects will be delayed if the pool_lock
      is busy. This will temporarily increase the amount of free objects
      available at the free pool when the system is busy. As a result,
      the number of kmem_cache allocation and freeing is reduced.
      
      To further reduce the lock operations free debug objects in batches of
      four.
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: "Du Changbin" <changbin.du@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jan Stancek <jstancek@redhat.com>
      Link: http://lkml.kernel.org/r/1483647425-4135-4-git-send-email-longman@redhat.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      858274b6
  12. 04 2月, 2017 3 次提交
  13. 03 2月, 2017 1 次提交
    • J
      ext4: move halfmd4 into hash.c directly · 1c83a9aa
      Jason A. Donenfeld 提交于
      The "half md4" transform should not be used by any new code. And
      fortunately, it's only used now by ext4. Since ext4 supports several
      hashing methods, at some point it might be desirable to move to
      something like SipHash. As an intermediate step, remove half md4 from
      cryptohash.h and lib, and make it just a local function in ext4's
      hash.c. There's precedent for doing this; the other function ext can use
      for its hashes -- TEA -- is also implemented in the same place. Also, by
      being a local function, this might allow gcc to perform some additional
      optimizations.
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Reviewed-by: NAndreas Dilger <adilger@dilger.ca>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      1c83a9aa
  14. 27 1月, 2017 1 次提交
  15. 25 1月, 2017 5 次提交
  16. 24 1月, 2017 1 次提交
    • M
      rcu: Enable RCU tracepoints by default to aid in debugging · 96151825
      Matt Fleming 提交于
      While debugging a performance issue I needed to understand why
      RCU sofitrqs were firing so frequently.
      
      Unfortunately, the RCU callback tracepoints are hidden behind
      CONFIG_RCU_TRACE which defaults to off in the upstream kernel and is
      likely to also be disabled in enterprise distribution configs.
      
      Enable it by default for CONFIG_TREE_RCU. However, we must keep it
      disabled for tiny RCU, because it would otherwise pull in a large
      amount of code that would make tiny RCU less than tiny.
      
      I ran some file system metadata intensive workloads (git checkout,
      FS-Mark) on a variety of machines with this patch and saw no
      detectable change in performance.
      
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Signed-off-by: NMatt Fleming <matt@codeblueprint.co.uk>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      96151825
  17. 23 1月, 2017 1 次提交
    • C
      lib/prime_numbers: Suppress warn on kmalloc failure · 717c8ae7
      Chris Wilson 提交于
      The allocation for the bitmap may become very large, larger than
      MAX_ORDER, for large requests. We fail gracefully by falling back to
      trail-division, so disable the warning from kmalloc:
      
        521.961092] WARNING: CPU: 0 PID: 30637 at mm/page_alloc.c:3548 __alloc_pages_slowpath+0x237/0x9a0
      [  521.961105] Modules linked in: i915(+) drm_kms_helper intel_gtt prime_numbers [last unloaded: drm_kms_helper]
      [  521.961126] CPU: 0 PID: 30637 Comm: drv_selftest Tainted: G     U  W       4.10.0-rc3+ #321
      [  521.961137] Hardware name:                  /        , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
      [  521.961148] Call Trace:
      [  521.961161]  dump_stack+0x4d/0x6f
      [  521.961172]  __warn+0xc1/0xe0
      [  521.961181]  warn_slowpath_null+0x18/0x20
      [  521.961189]  __alloc_pages_slowpath+0x237/0x9a0
      [  521.961200]  ? sg_init_table+0x1a/0x40
      [  521.961208]  ? get_page_from_freelist+0x3fa/0x910
      [  521.961275]  ? i915_gem_object_get_sg+0x272/0x2b0 [i915]
      [  521.961285]  __alloc_pages_nodemask+0x1ea/0x220
      [  521.961295]  kmalloc_order+0x1c/0x50
      [  521.961304]  __kmalloc+0x115/0x170
      [  521.961314]  expand_to_next_prime+0x43/0x180 [prime_numbers]
      [  521.961324]  next_prime_number+0x47/0xc0 [prime_numbers]
      [  521.961377]  igt_vma_rotate+0x386/0x590 [i915]
      [  521.961429]  i915_subtests+0x37/0xc0 [i915]
      [  521.961481]  i915_vma_mock_selftests+0x3d/0x70 [i915]
      [  521.961532]  run_selftests+0x16e/0x1f0 [i915]
      [  521.961541]  ? 0xffffffffa02a4000
      [  521.961592]  i915_mock_selftests+0x29/0x40 [i915]
      [  521.961638]  i915_init+0xa/0x5e [i915]
      [  521.961646]  ? 0xffffffffa02a4000
      [  521.961655]  do_one_initcall+0x3e/0x160
      [  521.961664]  ? __vunmap+0x7c/0xc0
      [  521.961672]  ? vfree+0x29/0x70
      [  521.961680]  ? kmem_cache_alloc+0xcf/0x120
      [  521.961690]  do_init_module+0x55/0x1c4
      [  521.961699]  load_module+0x1f3f/0x25b0
      [  521.961707]  ? __symbol_put+0x40/0x40
      [  521.961716]  ? kernel_read_file+0x100/0x190
      [  521.961725]  SYSC_finit_module+0xbc/0xf0
      [  521.961734]  SyS_finit_module+0x9/0x10
      [  521.961744]  entry_SYSCALL_64_fastpath+0x17/0x98
      [  521.961752] RIP: 0033:0x7f111aca4119
      [  521.961760] RSP: 002b:00007ffd8be6cbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [  521.961773] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f111aca4119
      [  521.961781] RDX: 0000000000000000 RSI: 000055dfc18bc8e0 RDI: 0000000000000006
      [  521.961789] RBP: 00007ffd8be6bbe0 R08: 0000000000000000 R09: 0000000000000000
      [  521.961796] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000005
      [  521.961805] R13: 000055dfc18bd3a0 R14: 00007ffd8be6bbc0 R15: 0000000000000005
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170113235119.22528-1-chris@chris-wilson.co.uk
      717c8ae7
  18. 20 1月, 2017 1 次提交
  19. 19 1月, 2017 2 次提交
  20. 16 1月, 2017 1 次提交
  21. 15 1月, 2017 1 次提交
  22. 14 1月, 2017 1 次提交
  23. 12 1月, 2017 1 次提交
  24. 11 1月, 2017 1 次提交