25 Feb, 2010

15 commits

  • Because the radix tree is used with many different locking
    designs, we cannot do any effective checking without changing
    the radix-tree APIs. It might make sense to do this later, but
    only if the RCU lockdep checking proves itself sufficiently
    valuable.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Create an rcu_dereference_check_fdtable() that encapsulates the
    rcu_dereference_check() condition for fcheck_files() use. This
    has the beneficial side-effect of getting rid of a very long
    line.

    Suggested-by: Peter Zijlstra
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Add lockdep-ified RCU primitives to alloc_fd(), files_fdtable()
    and fcheck_files().

    Cc: Alexander Viro
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    Cc: Alexander Viro
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • As suggested by Peter Ziljstra, make better choice of name
    for for_each_domain_rd(), containing "rcu_dereference", given
    that it is but a wrapper for rcu_dereference_check(). The name
    rcu_dereference_check_sched_domain() does that and provides a
    separate per-subsystem name space.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Update the rcu_dereference() usages to take advantage of the new
    lockdep-based checking.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    [ -v2: fix allmodconfig missing symbol export build failure on x86 ]
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Update rcu_dereference() primitives to use new lockdep-based
    checking. The rcu_dereference() in __in6_dev_get() may be
    protected either by rcu_read_lock() or RTNL, per Eric Dumazet.
    The rcu_dereference() in __sk_free() is protected by the fact
    that it is never reached if an update could change it. Check
    for this by using rcu_dereference_check() to verify that the
    struct sock's ->sk_wmem_alloc counter is zero.

    Acked-by: Eric Dumazet
    Acked-by: David S. Miller
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • The theory is that use of bare rcu_dereference() is more prone
    to error than use of the RCU list-traversal primitives.
    Therefore, disable lockdep RCU read-side critical-section
    checking in these primitives for the time being. Once all of
    the rcu_dereference() uses have been dealt with, it may be time
    to re-enable lockdep checking for the RCU list-traversal
    primitives.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Make rcu_dereference_check() print the list of held locks in
    addition to the stack dump to ease debugging.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Make rcu_dereference() check for being in an RCU read-side
    critical section, and create rcu_dereference_bh(),
    rcu_dereference_sched(), and srcu_dereference() to check for the
    other flavors of RCU. Also create rcu_dereference_raw() to
    avoid checking, and make rcu_dereference_check() use
    rcu_dereference_raw().

    Acked-by: Eric Dumazet
    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Inspection is proving insufficient to catch all RCU misuses,
    which is understandable given that rcu_dereference() might be
    protected by any of four different flavors of RCU (RCU, RCU-bh,
    RCU-sched, and SRCU), and might also/instead be protected by any
    of a number of locking primitives. It is therefore time to
    enlist the aid of lockdep.

    This set of patches is inspired by earlier work by Peter
    Zijlstra and Thomas Gleixner, and takes the following approach:

    o Set up separate lockdep classes for RCU, RCU-bh, and RCU-sched.

    o Set up separate lockdep classes for each instance of SRCU.

    o Create primitives that check for being in an RCU read-side
    critical section. These return exact answers if lockdep is
    fully enabled, but if unsure, report being in an RCU read-side
    critical section. (We want to avoid false positives!)
    The primitives are:

    For RCU: rcu_read_lock_held(void)

    For RCU-bh: rcu_read_lock_bh_held(void)

    For RCU-sched: rcu_read_lock_sched_held(void)

    For SRCU: srcu_read_lock_held(struct srcu_struct *sp)

    o Add rcu_dereference_check(), which takes a second argument
    in which one places a boolean expression based on the above
    primitives and/or lockdep_is_held().

    o A new kernel configuration parameter, CONFIG_PROVE_RCU, enables
    rcu_dereference_check(). This depends on CONFIG_PROVE_LOCKING,
    and should be quite helpful during the transition period while
    CONFIG_PROVE_RCU-unaware patches are in flight.

    The existing rcu_dereference() primitive does no checking, but
    upcoming patches will change that.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Merge reason: Update from -rc4 to -final.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Linus Torvalds
     
  • * 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
    parisc: Set PCI CLS early in boot.

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] Fix broken sn2 build

    Linus Torvalds
     
  • Set the PCI CLS early in the boot process to prevent
    device failures. In pcibios_set_master use the new
    pci_cache_line_size instead of a hard-coded value.

    Signed-off-by: Carlos O'Donell
    Reviewed-by: Grant Grundler
    Signed-off-by: Kyle McMartin

    Carlos O'Donell
     

24 Feb, 2010

9 commits

  • * 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
    microblaze: Fix out_le32() macro
    microblaze: Fix cache loop function for cache range

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    Revert "block: improve queue_should_plug() by looking at IO depths"

    Linus Torvalds
     
  • Trailing semicolon causes compilation involving out_le32() to fail.

    Signed-off-by: Steven J. Magnani
    Signed-off-by: Michal Simek

    Steven J. Magnani
     
  • I create wrong asm code but none test shows that this part of code is wrong.
    I am not convinces that were good idea to create asm optimized macros
    for caches. The reason is that there is not optimization with previous code
    that's why make sense to add old code and do some benchmarking which
    functions are faster.

    Signed-off-by: Michal Simek

    Michal Simek
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: bug fix for vlan + gro issue
    tc35815: Remove a wrong netif_wake_queue() call which triggers BUG_ON
    cdc_ether: new PID for Ericsson C3607w to the whitelist (resubmit)
    IPv6: better document max_addresses parameter
    MAINTAINERS: update mv643xx_eth maintenance status
    e1000: Fix DMA mapping error handling on RX
    iwlwifi: sanity check before counting number of tfds can be free
    iwlwifi: error checking for number of tfds in queue
    iwlwifi: set HT flags after channel in rxon

    Linus Torvalds
     
  • Traffic (tcp) doesnot start on a vlan interface when gro is enabled.
    Even the tcp handshake was not taking place.
    This is because, the eth_type_trans call before the netif_receive_skb
    in napi_gro_finish() resets the skb->dev to napi->dev from the previously
    set vlan netdev interface. This causes the ip_route_input to drop the
    incoming packet considering it as a packet coming from a martian source.

    I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7.
    With this fix, the traffic starts and the test runs fine on both vlan
    and non-vlan interfaces.

    CC: Herbert Xu
    CC: Patrick McHardy
    Signed-off-by: Ajit Khaparde
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI: Be in TS_POLLING state during mwait based C-state entry
    ACPI: Fix regression where _PPC is not read at boot even when ignore_ppc=0
    acer-wmi: Respect current backlight level when loading

    Linus Torvalds
     
  • * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/vmwgfx: Fix queries if no dma buffer thrashing is occuring.
    drm/nv50: fix vram ptes on IGPs to point at stolen system memory
    drm/nv50: fix instmem binding on IGPs to point at stolen system memory
    drm/nv50: improve vram page table construction
    drm/nv50: more efficient clearing of gpu page table entries
    drm/nv50: make nv50_mem_vm_{bind,unbind} operate only on vram
    drm/nouveau: Fix up pre-nv17 analog load detection.

    Linus Torvalds
     
  • Revert the change made to arch/ia64/sn/kernel/setup.c by commit
    204fba4aa303ea4a7bb726a539bf4a5b9e3203d0 as it breaks the build.

    Fixing the build the b94b08081fcecf83fa690d6c5664f6316fe72208 way
    breaks xpc because genksyms then fails to generate an CRC for
    per_cpu____sn_cnodeid_to_nasid because of limitations in the
    generic genksyms code.

    Signed-off-by: Hedi Berriche
    Signed-off-by: Tony Luck

    Hedi Berriche
     

23 Feb, 2010

16 commits