]> Git Repo - linux.git/commitdiff
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
authorIngo Molnar <[email protected]>
Thu, 30 Jul 2020 22:15:53 +0000 (00:15 +0200)
committerIngo Molnar <[email protected]>
Thu, 30 Jul 2020 22:15:53 +0000 (00:15 +0200)
Pull the v5.9 RCU bits from Paul E. McKenney:

 - Documentation updates
 - Miscellaneous fixes
 - kfree_rcu updates
 - RCU tasks updates
 - Read-side scalability tests
 - SRCU updates
 - Torture-test updates

Signed-off-by: Ingo Molnar <[email protected]>
1  2 
MAINTAINERS
fs/btrfs/extent_io.c
kernel/rcu/rcuperf.c
mm/mmap.c
net/core/sock.c

diff --combined MAINTAINERS
index f0569cf304cacb8792e56d79bbb195c0abbfcc6f,4429ce965b3a0a983fb1afd75545a7e050147b30..18d31f828172f2a1bf2cf3aab137791b138f81c9
@@@ -2929,7 -2929,6 +2929,7 @@@ F:      include/uapi/linux/atm
  
  ATMEL MACB ETHERNET DRIVER
  M:    Nicolas Ferre <[email protected]>
 +M:    Claudiu Beznea <[email protected]>
  S:    Supported
  F:    drivers/net/ethernet/cadence/
  
@@@ -3307,7 -3306,7 +3307,7 @@@ X:      arch/riscv/net/bpf_jit_comp32.
  
  BPF JIT for S390
  M:    Ilya Leoshkevich <[email protected]>
 -M:    Heiko Carstens <heiko.carstens@de.ibm.com>
 +M:    Heiko Carstens <hca@linux.ibm.com>
  M:    Vasily Gorbik <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -3947,7 -3946,7 +3947,7 @@@ L:      [email protected]
  S:    Supported
  F:    drivers/char/hw_random/cctrng.c
  F:    drivers/char/hw_random/cctrng.h
 -F:    Documentation/devicetree/bindings/rng/arm-cctrng.txt
 +F:    Documentation/devicetree/bindings/rng/arm-cctrng.yaml
  W:    https://developer.arm.com/products/system-ip/trustzone-cryptocell/cryptocell-700-family
  
  CEC FRAMEWORK
@@@ -5022,6 -5021,7 +5022,6 @@@ F:      drivers/mfd/da91??-*.
  F:    drivers/pinctrl/pinctrl-da90??.c
  F:    drivers/power/supply/da9052-battery.c
  F:    drivers/power/supply/da91??-*.c
 -F:    drivers/regulator/da903x.c
  F:    drivers/regulator/da9???-regulator.[ch]
  F:    drivers/regulator/slg51000-regulator.[ch]
  F:    drivers/rtc/rtc-da90??.c
@@@ -5111,7 -5111,7 +5111,7 @@@ M:      Vinod Koul <[email protected]
  L:    [email protected]
  S:    Maintained
  Q:    https://patchwork.kernel.org/project/linux-dmaengine/list/
 -T:    git git://git.infradead.org/users/vkoul/slave-dma.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git
  F:    Documentation/devicetree/bindings/dma/
  F:    Documentation/driver-api/dmaengine/
  F:    drivers/dma/
@@@ -5490,7 -5490,7 +5490,7 @@@ F:      include/uapi/drm/r128_drm.
  DRM DRIVER FOR RAYDIUM RM67191 PANELS
  M:    Robert Chiras <[email protected]>
  S:    Maintained
 -F:    Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt
 +F:    Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml
  F:    drivers/gpu/drm/panel/panel-raydium-rm67191.c
  
  DRM DRIVER FOR ROCKTECH JH057N00900 PANELS
@@@ -6956,7 -6956,6 +6956,7 @@@ M:      Timur Tabi <[email protected]
  M:    Nicolin Chen <[email protected]>
  M:    Xiubo Li <[email protected]>
  R:    Fabio Estevam <[email protected]>
 +R:    Shengjiu Wang <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected]
  S:    Maintained
@@@ -9306,17 -9305,6 +9306,17 @@@ F:    Documentation/kbuild/kconfig
  F:    scripts/Kconfig.include
  F:    scripts/kconfig/
  
 +KCOV
 +R:    Dmitry Vyukov <[email protected]>
 +R:    Andrey Konovalov <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/dev-tools/kcov.rst
 +F:    include/linux/kcov.h
 +F:    include/uapi/linux/kcov.h
 +F:    kernel/kcov.c
 +F:    scripts/Makefile.kcov
 +
  KCSAN
  M:    Marco Elver <[email protected]>
  R:    Dmitry Vyukov <[email protected]>
@@@ -11252,7 -11240,7 +11252,7 @@@ S:   Maintaine
  F:    drivers/crypto/atmel-ecc.*
  
  MICROCHIP I2C DRIVER
 -M:    Ludovic Desroches <ludovic.desroches@microchip.com>
 +M:    Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
  L:    [email protected]
  S:    Supported
  F:    drivers/i2c/busses/i2c-at91-*.c
@@@ -11345,17 -11333,17 +11345,17 @@@ F:        drivers/iio/adc/at91-sama5d2_adc.
  F:    include/dt-bindings/iio/adc/at91-sama5d2_adc.h
  
  MICROCHIP SAMA5D2-COMPATIBLE SHUTDOWN CONTROLLER
 -M:    Nicolas Ferre <nicolas.ferre@microchip.com>
 +M:    Claudiu Beznea <claudiu.beznea@microchip.com>
  S:    Supported
  F:    drivers/power/reset/at91-sama5d2_shdwc.c
  
  MICROCHIP SPI DRIVER
 -M:    Nicolas Ferre <nicolas.ferre@microchip.com>
 +M:    Tudor Ambarus <tudor.ambarus@microchip.com>
  S:    Supported
  F:    drivers/spi/spi-atmel.*
  
  MICROCHIP SSC DRIVER
 -M:    Nicolas Ferre <nicolas.ferre@microchip.com>
 +M:    Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
  L:    [email protected] (moderated for non-subscribers)
  S:    Supported
  F:    drivers/misc/atmel-ssc.c
@@@ -14449,7 -14437,7 +14449,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    Documentation/RCU/
  F:    include/linux/rcu*
  F:    kernel/rcu/
- X:    Documentation/RCU/torture.txt
+ X:    Documentation/RCU/torture.rst
  X:    include/linux/srcu*.h
  X:    kernel/rcu/srcu*.c
  
@@@ -14586,8 -14574,8 +14586,8 @@@ RENESAS R-CAR THERMAL DRIVER
  M:    Niklas Söderlund <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
 -F:    Documentation/devicetree/bindings/thermal/rcar-thermal.txt
 +F:    Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
 +F:    Documentation/devicetree/bindings/thermal/rcar-thermal.yaml
  F:    drivers/thermal/rcar_gen3_thermal.c
  F:    drivers/thermal/rcar_thermal.c
  
@@@ -14843,7 -14831,7 +14843,7 @@@ S:   Maintaine
  F:    drivers/video/fbdev/savage/
  
  S390
 -M:    Heiko Carstens <heiko.carstens@de.ibm.com>
 +M:    Heiko Carstens <hca@linux.ibm.com>
  M:    Vasily Gorbik <[email protected]>
  M:    Christian Borntraeger <[email protected]>
  L:    [email protected]
@@@ -14874,8 -14862,7 +14874,8 @@@ F:   drivers/s390/block/dasd
  F:    include/linux/dasd_mod.h
  
  S390 IOMMU (PCI)
 -M:    Gerald Schaefer <[email protected]>
 +M:    Matthew Rosato <[email protected]>
 +M:    Gerald Schaefer <[email protected]>
  L:    [email protected]
  S:    Supported
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -14903,7 -14890,7 +14903,7 @@@ F:   drivers/s390/net
  
  S390 PCI SUBSYSTEM
  M:    Niklas Schnelle <[email protected]>
 -M:    Gerald Schaefer <gerald.schaefer@de.ibm.com>
 +M:    Gerald Schaefer <gerald.schaefer@linux.ibm.com>
  L:    [email protected]
  S:    Supported
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -17301,7 -17288,7 +17301,7 @@@ M:   Josh Triplett <[email protected]
  L:    [email protected]
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
- F:    Documentation/RCU/torture.txt
+ F:    Documentation/RCU/torture.rst
  F:    kernel/locking/locktorture.c
  F:    kernel/rcu/rcuperf.c
  F:    kernel/rcu/rcutorture.c
@@@ -17526,7 -17513,7 +17526,7 @@@ F:   Documentation/admin-guide/ufs.rs
  F:    fs/ufs/
  
  UHID USERSPACE HID IO DRIVER
 -M:    David Herrmann <dh.herrmann@googlemail.com>
 +M:    David Rheinsberg <david.rheinsberg@gmail.com>
  L:    [email protected]
  S:    Maintained
  F:    drivers/hid/uhid.c
@@@ -18485,7 -18472,7 +18485,7 @@@ S:   Maintaine
  F:    drivers/rtc/rtc-sd3078.c
  
  WIIMOTE HID DRIVER
 -M:    David Herrmann <dh.herrmann@googlemail.com>
 +M:    David Rheinsberg <david.rheinsberg@gmail.com>
  L:    [email protected]
  S:    Maintained
  F:    drivers/hid/hid-wiimote*
diff --combined fs/btrfs/extent_io.c
index 60278e52c37abb8c35a1ae42098f43e622f70930,704239546093f248bf1b3e9fd242e68b7c2c7ca9..eeaee346f5a959f01ce8ebfa53e9969860307418
@@@ -1999,8 -1999,7 +1999,8 @@@ static int __process_pages_contig(struc
                                if (!PageDirty(pages[i]) ||
                                    pages[i]->mapping != mapping) {
                                        unlock_page(pages[i]);
 -                                      put_page(pages[i]);
 +                                      for (; i < ret; i++)
 +                                              put_page(pages[i]);
                                        err = -EAGAIN;
                                        goto out;
                                }
@@@ -4516,6 -4515,8 +4516,8 @@@ int try_release_extent_mapping(struct p
  
                        /* once for us */
                        free_extent_map(em);
+                       cond_resched(); /* Allow large-extent preemption. */
                }
        }
        return try_release_extent_state(tree, page, mask);
@@@ -5059,28 -5060,25 +5061,28 @@@ struct extent_buffer *alloc_dummy_exten
  static void check_buffer_tree_ref(struct extent_buffer *eb)
  {
        int refs;
 -      /* the ref bit is tricky.  We have to make sure it is set
 -       * if we have the buffer dirty.   Otherwise the
 -       * code to free a buffer can end up dropping a dirty
 -       * page
 +      /*
 +       * The TREE_REF bit is first set when the extent_buffer is added
 +       * to the radix tree. It is also reset, if unset, when a new reference
 +       * is created by find_extent_buffer.
         *
 -       * Once the ref bit is set, it won't go away while the
 -       * buffer is dirty or in writeback, and it also won't
 -       * go away while we have the reference count on the
 -       * eb bumped.
 +       * It is only cleared in two cases: freeing the last non-tree
 +       * reference to the extent_buffer when its STALE bit is set or
 +       * calling releasepage when the tree reference is the only reference.
         *
 -       * We can't just set the ref bit without bumping the
 -       * ref on the eb because free_extent_buffer might
 -       * see the ref bit and try to clear it.  If this happens
 -       * free_extent_buffer might end up dropping our original
 -       * ref by mistake and freeing the page before we are able
 -       * to add one more ref.
 +       * In both cases, care is taken to ensure that the extent_buffer's
 +       * pages are not under io. However, releasepage can be concurrently
 +       * called with creating new references, which is prone to race
 +       * conditions between the calls to check_buffer_tree_ref in those
 +       * codepaths and clearing TREE_REF in try_release_extent_buffer.
         *
 -       * So bump the ref count first, then set the bit.  If someone
 -       * beat us to it, drop the ref we added.
 +       * The actual lifetime of the extent_buffer in the radix tree is
 +       * adequately protected by the refcount, but the TREE_REF bit and
 +       * its corresponding reference are not. To protect against this
 +       * class of races, we call check_buffer_tree_ref from the codepaths
 +       * which trigger io after they set eb->io_pages. Note that once io is
 +       * initiated, TREE_REF can no longer be cleared, so that is the
 +       * moment at which any such race is best fixed.
         */
        refs = atomic_read(&eb->refs);
        if (refs >= 2 && test_bit(EXTENT_BUFFER_TREE_REF, &eb->bflags))
@@@ -5531,11 -5529,6 +5533,11 @@@ int read_extent_buffer_pages(struct ext
        clear_bit(EXTENT_BUFFER_READ_ERR, &eb->bflags);
        eb->read_mirror = 0;
        atomic_set(&eb->io_pages, num_reads);
 +      /*
 +       * It is possible for releasepage to clear the TREE_REF bit before we
 +       * set io_pages. See check_buffer_tree_ref for a more detailed comment.
 +       */
 +      check_buffer_tree_ref(eb);
        for (i = 0; i < num_pages; i++) {
                page = eb->pages[i];
  
diff --combined kernel/rcu/rcuperf.c
index 9eb39c20082c52a88f8926932111ba4214baf814,d906ca9879368286f362a6ec6374c638f6186bca..ec903d7817785a933203092a235dac3922db5f95
@@@ -69,6 -69,11 +69,11 @@@ MODULE_AUTHOR("Paul E. McKenney <paulmc
   *    value specified by nr_cpus for a read-only test.
   *
   * Various other use cases may of course be specified.
+  *
+  * Note that this test's readers are intended only as a test load for
+  * the writers.  The reader performance statistics will be overly
+  * pessimistic due to the per-critical-section interrupt disabling,
+  * test-end checks, and the pair of calls through pointers.
   */
  
  #ifdef MODULE
@@@ -309,8 -314,10 +314,10 @@@ static void rcu_perf_wait_shutdown(void
  }
  
  /*
-  * RCU perf reader kthread.  Repeatedly does empty RCU read-side
-  * critical section, minimizing update-side interference.
+  * RCU perf reader kthread.  Repeatedly does empty RCU read-side critical
+  * section, minimizing update-side interference.  However, the point of
+  * this test is not to evaluate reader performance, but instead to serve
+  * as a test load for update-side performance testing.
   */
  static int
  rcu_perf_reader(void *arg)
@@@ -576,11 -583,8 +583,8 @@@ static int compute_real(int n
  static int
  rcu_perf_shutdown(void *arg)
  {
-       do {
-               wait_event(shutdown_wq,
-                          atomic_read(&n_rcu_perf_writer_finished) >=
-                          nrealwriters);
-       } while (atomic_read(&n_rcu_perf_writer_finished) < nrealwriters);
+       wait_event(shutdown_wq,
+                  atomic_read(&n_rcu_perf_writer_finished) >= nrealwriters);
        smp_mb(); /* Wake before output. */
        rcu_perf_cleanup();
        kernel_power_off();
@@@ -693,11 -697,8 +697,8 @@@ kfree_perf_cleanup(void
  static int
  kfree_perf_shutdown(void *arg)
  {
-       do {
-               wait_event(shutdown_wq,
-                          atomic_read(&n_kfree_perf_thread_ended) >=
-                          kfree_nrealthreads);
-       } while (atomic_read(&n_kfree_perf_thread_ended) < kfree_nrealthreads);
+       wait_event(shutdown_wq,
+                  atomic_read(&n_kfree_perf_thread_ended) >= kfree_nrealthreads);
  
        smp_mb(); /* Wake before output. */
  
@@@ -723,7 -724,7 +724,7 @@@ kfree_perf_init(void
                schedule_timeout_uninterruptible(1);
        }
  
 -      pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj));
 +      pr_alert("kfree object size=%zu\n", kfree_mult * sizeof(struct kfree_obj));
  
        kfree_reader_tasks = kcalloc(kfree_nrealthreads, sizeof(kfree_reader_tasks[0]),
                               GFP_KERNEL);
diff --combined mm/mmap.c
index 8c7ca737a19b3db6274c9f918c00bfdfe9597dcf,972f839c6ec836bb8ef579feb17a4c2af01d4dac..dcdab2675a21a8a8c92abb4c64a525a2d7f0d075
+++ b/mm/mmap.c
@@@ -2620,7 -2620,7 +2620,7 @@@ static void unmap_region(struct mm_stru
   * Create a list of vma's touched by the unmap, removing them from the mm's
   * vma list as we go..
   */
 -static void
 +static bool
  detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
        struct vm_area_struct *prev, unsigned long end)
  {
  
        /* Kill the cache */
        vmacache_invalidate(mm);
 +
 +      /*
 +       * Do not downgrade mmap_lock if we are next to VM_GROWSDOWN or
 +       * VM_GROWSUP VMA. Such VMAs can change their size under
 +       * down_read(mmap_lock) and collide with the VMA we are about to unmap.
 +       */
 +      if (vma && (vma->vm_flags & VM_GROWSDOWN))
 +              return false;
 +      if (prev && (prev->vm_flags & VM_GROWSUP))
 +              return false;
 +      return true;
  }
  
  /*
@@@ -2836,8 -2825,7 +2836,8 @@@ int __do_munmap(struct mm_struct *mm, u
        }
  
        /* Detach vmas from rbtree */
 -      detach_vmas_to_be_unmapped(mm, vma, prev, end);
 +      if (!detach_vmas_to_be_unmapped(mm, vma, prev, end))
 +              downgrade = false;
  
        if (downgrade)
                mmap_write_downgrade(mm);
@@@ -3171,6 -3159,7 +3171,7 @@@ void exit_mmap(struct mm_struct *mm
                if (vma->vm_flags & VM_ACCOUNT)
                        nr_accounted += vma_pages(vma);
                vma = remove_vma(vma);
+               cond_resched();
        }
        vm_unacct_memory(nr_accounted);
  }
diff --combined net/core/sock.c
index 2e5b7870e5d35d40de7d4fdc68bfe1bbf9c09de7,6921a85a11778923841b1035ae2f3d93b102f966..b8ac834f5386d994a07a6424216dd6f0afc88c85
@@@ -1926,7 -1926,7 +1926,7 @@@ struct sock *sk_clone_lock(const struc
                /* sk->sk_memcg will be populated at accept() time */
                newsk->sk_memcg = NULL;
  
 -              cgroup_sk_alloc(&newsk->sk_cgrp_data);
 +              cgroup_sk_clone(&newsk->sk_cgrp_data);
  
                rcu_read_lock();
                filter = rcu_dereference(sk->sk_filter);
  
                /*
                 * Before updating sk_refcnt, we must commit prior changes to memory
-                * (Documentation/RCU/rculist_nulls.txt for details)
+                * (Documentation/RCU/rculist_nulls.rst for details)
                 */
                smp_wmb();
                refcount_set(&newsk->sk_refcnt, 2);
@@@ -3035,7 -3035,7 +3035,7 @@@ void sock_init_data(struct socket *sock
        sk_rx_queue_clear(sk);
        /*
         * Before updating sk_refcnt, we must commit prior changes to memory
-        * (Documentation/RCU/rculist_nulls.txt for details)
+        * (Documentation/RCU/rculist_nulls.rst for details)
         */
        smp_wmb();
        refcount_set(&sk->sk_refcnt, 1);
This page took 0.16141 seconds and 4 git commands to generate.