01 Nov, 2011

2 commits


13 Sep, 2011

1 commit

  • The dca_lock can be taken in atomic context:

    [ 25.607536] Call Trace:
    [ 25.607557] [] try_stack_unwind+0x151/0x1a0
    [ 25.607566] [] dump_trace+0x92/0x370
    [ 25.607573] [] show_trace_log_lvl+0x5c/0x80
    [ 25.607578] [] show_trace+0x15/0x20
    [ 25.607587] [] dump_stack+0x77/0x8f
    [ 25.607595] [] __might_sleep+0x11a/0x130
    [ 25.607602] [] rt_spin_lock+0x83/0x90
    [ 25.607611] [] dca_common_get_tag+0x28/0x80 [dca]
    [ 25.607622] [] dca3_get_tag+0x18/0x20 [dca]
    [ 25.607634] [] igb_update_dca+0xb1/0x1d0 [igb]
    [ 25.607649] [] igb_setup_dca+0x65/0x80 [igb]
    [ 25.607663] [] igb_probe+0x946/0xe4d [igb]
    [ 25.607678] [] local_pci_probe+0x17/0x20
    [ 25.607686] [] pci_device_probe+0x121/0x130
    [ 25.607699] [] driver_probe_device+0xd2/0x2e0
    [ 25.607707] [] __driver_attach+0x9b/0xa0
    [ 25.607714] [] bus_for_each_dev+0x6b/0xa0
    [ 25.607720] [] driver_attach+0x21/0x30
    [ 25.607727] [] bus_add_driver+0x1e5/0x350
    [ 25.607734] [] driver_register+0x81/0x160
    [ 25.607742] [] __pci_register_driver+0x6f/0xf0
    [ 25.607752] [] igb_init_module+0x5b/0x5d [igb]
    [ 25.607769] [] do_one_initcall+0x3d/0x1a0
    [ 25.607778] [] sys_init_module+0xe6/0x270
    [ 25.607786] [] system_call_fastpath+0x16/0x1b
    [ 25.607794] [] 0x7f84d6783f4a

    and thus must not be preempted on -rt.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Mike Galbraith
    [ Fixed the domain allocation which was calling kzalloc from the irq disabled section ]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Mike Galbraith
     

23 Mar, 2011

1 commit


14 Jan, 2011

1 commit

  • The return here doesn't release the locks or re-enable IRQs. But as
    Andrew Morton points out, domain is never NULL. list_first_entry()
    essentially never returns NULL and also we already verified that the list
    is not empty.

    Signed-off-by: Dan Carpenter
    Acked-by: Maciej Sosnowski
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

18 Sep, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

14 Sep, 2009

1 commit


11 Sep, 2009

1 commit

  • This patch enables DCA support on multiple-IOH/multiple-IIO architectures.
    It modifies dca module by replacing single dca_providers list
    with dca_domains list, each domain containing separate list of providers.
    This approach lets dca driver manage multiple domains, i.e. sets of providers
    and requesters mapped back to the same PCI root complex device.
    The driver takes care to register each requester to a provider
    from the same domain.

    Signed-off-by: Dan Williams
    Signed-off-by: Maciej Sosnowski

    Maciej Sosnowski
     

24 Mar, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
    ucc_geth: Fix oops when using fixed-link support
    dm9000: locking bugfix
    net: update dnet.c for bus_id removal
    dnet: DNET should depend on HAS_IOMEM
    dca: add missing copyright/license headers
    nl80211: Check that function pointer != NULL before using it
    sungem: missing net_device_ops
    be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
    be2net: replenish when posting to rx-queue is starved in out of mem conditions
    bas_gigaset: correctly allocate USB interrupt transfer buffer
    smsc911x: reset last known duplex and carrier on open
    sh_eth: Fix mistake of the address of SH7763
    sh_eth: Change handling of IRQ
    netns: oops in ip[6]_frag_reasm incrementing stats
    net: kfree(napi->skb) => kfree_skb
    net: fix sctp breakage
    ipv6: fix display of local and remote sit endpoints
    net: Document /proc/sys/net/core/netdev_budget
    tulip: fix crash on iface up with shirq debug
    virtio_net: Make virtio_net support carrier detection
    ...

    Linus Torvalds
     

22 Mar, 2009

1 commit


05 Mar, 2009

1 commit


03 Feb, 2009

1 commit

  • Change spin_locks to irqsave to prevent dead-locks.
    Protect adding and deleting to/from dca_providers list.
    Drop the lock during dca_sysfs_add_req() and dca_sysfs_remove_req() calls
    as they might sleep (use GFP_KERNEL allocation).

    Signed-off-by: Maciej Sosnowski
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Maciej Sosnowski
     

07 Jan, 2009

1 commit


11 Nov, 2008

1 commit


17 Oct, 2008

1 commit


24 Jul, 2008

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (24 commits)
    I/OAT: I/OAT version 3.0 support
    I/OAT: tcp_dma_copybreak default value dependent on I/OAT version
    I/OAT: Add watchdog/reset functionality to ioatdma
    iop_adma: cleanup iop_chan_xor_slot_count
    iop_adma: document how to calculate the minimum descriptor pool size
    iop_adma: directly reclaim descriptors on allocation failure
    async_tx: make async_tx_test_ack a boolean routine
    async_tx: remove depend_tx from async_tx_sync_epilog
    async_tx: export async_tx_quiesce
    async_tx: fix handling of the "out of descriptor" condition in async_xor
    async_tx: ensure the xor destination buffer remains dma-mapped
    async_tx: list_for_each_entry_rcu() cleanup
    dmaengine: Driver for the Synopsys DesignWare DMA controller
    dmaengine: Add slave DMA interface
    dmaengine: add DMA_COMPL_SKIP_{SRC,DEST}_UNMAP flags to control dma unmap
    dmaengine: Add dma_client parameter to device_alloc_chan_resources
    dmatest: Simple DMA memcpy test client
    dmaengine: DMA engine driver for Marvell XOR engine
    iop-adma: fix platform driver hotplug/coldplug
    dmaengine: track the number of clients using a channel
    ...

    Fixed up conflict in drivers/dca/dca-sysfs.c manually

    Linus Torvalds
     

23 Jul, 2008

1 commit

  • This patch adds to ioatdma and dca modules
    support for Intel I/OAT DMA engine ver.3 (aka CB3 device).
    The main features of I/OAT ver.3 are:
    * 8 single channel DMA devices (8 channels total)
    * 8 DCA providers, each can accept 2 requesters
    * 8-bit TAG values and 32-bit extended APIC IDs

    Signed-off-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Maciej Sosnowski
     

22 Jul, 2008

1 commit


09 Feb, 2008

1 commit


17 Oct, 2007

2 commits

  • Add code to connect to the DCA driver and provide cpu tags for use by
    drivers that would like to use Direct Cache Access hints.

    [Adrian Bunk] Several Kconfig cleanup items
    [Andrew Morten, Chris Leech] Fix for using cpu_physical_id() even when
    built for uni-processor

    Signed-off-by: Shannon Nelson
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson
     
  • Direct Cache Access (DCA) is a method for warming the CPU cache before data
    is used, with the intent of lessening the impact of cache misses. This
    patch adds a manager and interface for matching up client requests for DCA
    services with devices that offer DCA services.

    In order to use DCA, a module must do bus writes with the appropriate tag
    bits set to trigger a cache read for a specific CPU. However, different
    CPUs and chipsets can require different sets of tag bits, and the methods
    for determining the correct bits may be simple hardcoding or may be a
    hardware specific magic incantation. This interface is a way for DCA
    clients to find the correct tag bits for the targeted CPU without needing
    to know the specifics.

    [Dave Miller] use DEFINE_SPINLOCK()

    Signed-off-by: Shannon Nelson
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shannon Nelson