lkml.org 
[lkml]   [2007]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 29 of 33] IB/ipath - fix unit selection due to all cpu affinity bits set
    Date
    From
    # HG changeset patch
    # User Bryan O'Sullivan <bos@pathscale.com>
    # Date 1173994465 25200
    # Node ID 8c4f730dbde3eed6e066ead5be4746d58840f24f
    # Parent b436c73d4fe312c3cba092d5f642de5c0ff6aa91
    IB/ipath - fix unit selection due to all cpu affinity bits set

    At some point things changed so that all the affinity bits can be
    set, but cpus_full() macro is not true. This caused problems with
    the unit selection logic on multi-unit (board) configurations.

    Signed-off-by: Dave Olson <dave.olson@qlogic.com>
    Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>

    diff -r b436c73d4fe3 -r 8c4f730dbde3 drivers/infiniband/hw/ipath/ipath_file_ops.c
    --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c Thu Mar 15 14:34:25 2007 -0700
    +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c Thu Mar 15 14:34:25 2007 -0700
    @@ -1592,15 +1592,16 @@ static int find_best_unit(struct file *f
    */
    if (!cpus_empty(current->cpus_allowed) &&
    !cpus_full(current->cpus_allowed)) {
    - int ncpus = num_online_cpus(), curcpu = -1;
    + int ncpus = num_online_cpus(), curcpu = -1, nset = 0;
    for (i = 0; i < ncpus; i++)
    if (cpu_isset(i, current->cpus_allowed)) {
    ipath_cdbg(PROC, "%s[%u] affinity set for "
    - "cpu %d\n", current->comm,
    - current->pid, i);
    + "cpu %d/%d\n", current->comm,
    + current->pid, i, ncpus);
    curcpu = i;
    + nset++;
    }
    - if (curcpu != -1) {
    + if (curcpu != -1 && nset != ncpus) {
    if (npresent) {
    prefunit = curcpu / (ncpus / npresent);
    ipath_cdbg(PROC,"%s[%u] %d chips, %d cpus, "
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-03-15 23:21    [W:0.021 / U:1.488 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site