[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <8c4f730dbde3eed6e066.1173995113@iqa-25.internal.keyresearch.com>
Date: Thu, 15 Mar 2007 14:45:13 -0700
From: Bryan O'Sullivan <bos@...hscale.com>
To: rdreier@...co.com
Cc: openib-general@...nfabrics.org, linux-kernel@...r.kernel.org
Subject: [PATCH 29 of 33] IB/ipath - fix unit selection due to all cpu
affinity bits set
# HG changeset patch
# User Bryan O'Sullivan <bos@...hscale.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@...gic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@...gic.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists