Whamcloud - gitweb
LU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test 84/5384/7
authorJames Simmons <uja.ornl@gmail.com>
Wed, 10 Jul 2013 19:50:54 +0000 (15:50 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 23 Jul 2013 05:28:28 +0000 (05:28 +0000)
set_cpus_allowed_ptr replaced set_cpus_allowed in v2.6.32.

We can remove the test and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I684589fd13b52a79fbe4aba6229d89273ff3d9da
Reviewed-on: http://review.whamcloud.com/5384
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/linux/linux-prim.h
libcfs/libcfs/linux/linux-cpu.c
lustre/autoconf/lustre-core.m4
lustre/ptlrpc/ptlrpcd.c

index b0bdb58..634a50b 100644 (file)
 #define CFS_NR_CPUS     1
 #endif
 
-#ifdef HAVE_SET_CPUS_ALLOWED
-#define cfs_set_cpus_allowed(t, mask)  set_cpus_allowed(t, mask)
-#else
-#define cfs_set_cpus_allowed(t, mask)  set_cpus_allowed_ptr(t, &(mask))
-#endif
-
 /*
  * cache
  */
index 95777a8..a708148 100644 (file)
@@ -627,11 +627,7 @@ cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt)
                if (cpu_isset(i, *cpumask))
                        continue;
 
-#ifdef HAVE_SET_CPUS_ALLOWED
-               rc = set_cpus_allowed(cfs_current(), *cpumask);
-#else
                rc = set_cpus_allowed_ptr(cfs_current(), cpumask);
-#endif
                set_mems_allowed(*nodemask);
                if (rc == 0)
                        cfs_schedule(); /* switch to allowed CPU */
index 5a778c2..ec50de0 100644 (file)
@@ -769,19 +769,6 @@ EXTRA_KCFLAGS="-I$LINUX/fs"
 EXTRA_KCFLAGS=$tmp_flags
 ])
 
-# 2.6.32 set_cpus_allowed is no more defined if CONFIG_CPUMASK_OFFSTACK=yes
-AC_DEFUN([LC_SET_CPUS_ALLOWED],
-         [AC_MSG_CHECKING([if kernel defines set_cpus_allowed])
-          LB_LINUX_TRY_COMPILE(
-                [#include <linux/sched.h>],
-                [struct task_struct *p = NULL;
-                 cpumask_t mask = { { 0 } };
-                 (void) set_cpus_allowed(p, mask);],
-                [AC_MSG_RESULT([yes])
-                 AC_DEFINE(HAVE_SET_CPUS_ALLOWED, 1,
-                           [set_cpus_allowed is exported by the kernel])],
-                [AC_MSG_RESULT([no])] )])
-
 #
 # 2.6.36 fs_struct.lock use spinlock instead of rwlock.
 #
@@ -1599,7 +1586,6 @@ AC_DEFUN([LC_PROG_LINUX],
 
          # 2.6.32
          LC_BLK_QUEUE_MAX_SEGMENTS
-         LC_SET_CPUS_ALLOWED
 
         # 2.6.34
         LC_HAVE_DQUOT_FS_DISK_QUOTA
index 5f8f5c2..ea7b457 100644 (file)
@@ -420,8 +420,8 @@ static int ptlrpcd(void *arg)
                                if (++index >= cfs_num_possible_cpus())
                                        index = 0;
                        }
-                       cfs_set_cpus_allowed(cfs_current(),
-                                    *cpumask_of_node(cpu_to_node(index)));
+                       set_cpus_allowed_ptr(cfs_current(),
+                                    cpumask_of_node(cpu_to_node(index)));
                }
        }
 #endif