Whamcloud - gitweb
LU-6245 libcfs: remove sysctl module handling 59/19459/7
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 26 Apr 2016 00:54:50 +0000 (20:54 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 4 May 2016 15:00:55 +0000 (15:00 +0000)
Remove the sysctl handling we have for module parameters.
This code only gets built if CFS_SYSFS_MODULE_PARM is not
1 which is never the case. So this code is never built.
Plus this code has long been replaced by the sysfs module
parameters handling.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I5635bfd75a53bdd25af51c65fb1c2550d3cbbbaa
Reviewed-on: http://review.whamcloud.com/19459
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/gnilnd/gnilnd.c
lnet/klnds/gnilnd/gnilnd.h
lnet/klnds/gnilnd/gnilnd_modparams.c
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/o2iblnd/o2iblnd.h
lnet/klnds/o2iblnd/o2iblnd_modparams.c
lnet/klnds/socklnd/socklnd.c
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_lib.c
lnet/klnds/socklnd/socklnd_modparams.c

index 20d0730..1fa2bbc 100644 (file)
@@ -2883,7 +2883,6 @@ static void __exit kgnilnd_exit(void)
        lnet_unregister_lnd(&the_kgnilnd);
        kgnilnd_proc_fini();
        kgnilnd_remove_sysctl();
        lnet_unregister_lnd(&the_kgnilnd);
        kgnilnd_proc_fini();
        kgnilnd_remove_sysctl();
-       kgnilnd_tunables_fini();
 }
 
 static int __init kgnilnd_init(void)
 }
 
 static int __init kgnilnd_init(void)
index 6cc2ac7..4e491a7 100644 (file)
@@ -64,7 +64,6 @@
 
 #define DEBUG_SUBSYSTEM S_LND
 
 
 #define DEBUG_SUBSYSTEM S_LND
 
-#include <libcfs/linux/kp30.h>
 #include <libcfs/libcfs.h>
 #include <lnet/lnet.h>
 #include <lnet/lib-lnet.h>
 #include <libcfs/libcfs.h>
 #include <lnet/lnet.h>
 #include <lnet/lib-lnet.h>
@@ -491,9 +490,6 @@ typedef struct kgn_tunables {
        int     *kgn_reg_fail_timeout; /* registration failure timeout */
        int     *kgn_thread_affinity;  /* bind scheduler threads to cpus */
        int     *kgn_thread_safe;      /* use thread safe kgni API */
        int     *kgn_reg_fail_timeout; /* registration failure timeout */
        int     *kgn_thread_affinity;  /* bind scheduler threads to cpus */
        int     *kgn_thread_safe;      /* use thread safe kgni API */
-#if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
-       struct ctl_table_header *kgn_sysctl;  /* sysctl interface */
-#endif
 } kgn_tunables_t;
 
 typedef struct kgn_mbox_info {
 } kgn_tunables_t;
 
 typedef struct kgn_mbox_info {
@@ -1811,7 +1807,6 @@ int kgnilnd_start_rca_thread(void);
 int kgnilnd_get_node_state(__u32 nid);
 
 int kgnilnd_tunables_init(void);
 int kgnilnd_get_node_state(__u32 nid);
 
 int kgnilnd_tunables_init(void);
-void kgnilnd_tunables_fini(void);
 void kgnilnd_init_msg(kgn_msg_t *msg, int type, lnet_nid_t source);
 
 void kgnilnd_bump_timeouts(__u32 nap_time, char *reason);
 void kgnilnd_init_msg(kgn_msg_t *msg, int type, lnet_nid_t source);
 
 void kgnilnd_bump_timeouts(__u32 nap_time, char *reason);
index eb4e7fd..942e5cb 100644 (file)
@@ -246,355 +246,11 @@ kgn_tunables_t kgnilnd_tunables = {
        .kgn_max_purgatory          = &max_conn_purg
 };
 
        .kgn_max_purgatory          = &max_conn_purg
 };
 
-#if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
-static struct ctl_table kgnilnd_ctl_table[] = {
-       {
-               INIT_CTL_NAME
-               .procname = "min_reconnect_interval",
-               .data     = &min_reconnect_interval,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "max_reconnect_interval",
-               .data     = &max_reconnect_interval,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "credits",
-               .data     = &credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "peer_credits",
-               .data     = &peer_credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "fma_cq_size",
-               .data     = &fma_cq_size,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "timeout",
-               .data     = &timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "max_immediate",
-               .data     = &max_immediate,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "checksum",
-               .data     = &checksum,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "bte_dlvr_mode",
-               .data     = &bte_dlvr_mode,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "ptag",
-               .data     = &ptag,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "pkey",
-               .data     = &pkey,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "nwildcard",
-               .data     = &nwildcard,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "bte_relaxed_ordering",
-               .data     = &bte_relaxed_ordering,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "checksum_dump",
-               .data     = &checksum_dump,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "nice",
-               .data     = &nice,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "rdmaq_intervals",
-               .data     = &rdmaq_intervals,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "loops",
-               .data     = &loops,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "hash_size",
-               .data     = &hash_size,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "peer_health",
-               .data     = &peer_health,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "vmap_cksum",
-               .data     = &vmap_cksum,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "mbox_per_block",
-               .data     = &mbox_per_block,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "mbox_credits"
-               .data     = &mbox_credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "sched_threads"
-               .data     = &sched_threads,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "net_hash_size",
-               .data     = &net_hash_size,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "hardware_timeout",
-               .data     = &hardware_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "mdd_timeout",
-               .data     = &mdd_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "max_retransmits"
-               .data     = &max_retransmits,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "concurrent_sends",
-               .data     = &concurrent_sends,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "nphys_mbox",
-               .data     = &nphys_mbox,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "sched_timeout",
-               .data     = &sched_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "sched_nice",
-               .data     = &sched_nice,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "reverse_rdma",
-               .data     = &reverse_rdma,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-               INIT_CTL_NAME
-               .procname = "dgram_timeout"
-               .data     = &dgram_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "peer_timeout"
-               .data     = &peer_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "eager_credits",
-               .data     = &eager_credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "efault_lbug"
-               .data     = &efault_lbug,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "thread_affinity"
-               .data     = &thread_affinity,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "thread_safe"
-               .data     = &thread_safe,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "reg_fail_timeout"
-               .data     = &reg_fail_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname = "max_conn_purg"
-               .data     = &max_conn_purg,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       { 0 }
-};
-
-static struct ctl_table kgnilnd_top_ctl_table[] = {
-       {
-               INIT_CTL_NAME
-               .procname = "gnilnd",
-               .data     = NULL,
-               .maxlen   = 0,
-               .mode     = 0555,
-               .child    = kgnilnd_ctl_table
-       },
-       { 0 }
-};
-#endif
-
 int
 kgnilnd_tunables_init()
 {
        int rc = 0;
 
 int
 kgnilnd_tunables_init()
 {
        int rc = 0;
 
-#if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
-       kgnilnd_tunables.kgn_sysctl =
-               register_sysctl_table(kgnilnd_top_ctl_table, 0);
-
-       if (kgnilnd_tunables.kgn_sysctl == NULL)
-               CWARN("Can't setup /proc tunables\n");
-#endif
        switch (*kgnilnd_tunables.kgn_checksum) {
        default:
                CERROR("Invalid checksum module parameter: %d\n",
        switch (*kgnilnd_tunables.kgn_checksum) {
        default:
                CERROR("Invalid checksum module parameter: %d\n",
@@ -636,12 +292,3 @@ kgnilnd_tunables_init()
 out:
        return rc;
 }
 out:
        return rc;
 }
-
-void
-kgnilnd_tunables_fini()
-{
-#if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
-       if (kgnilnd_tunables.kgn_sysctl != NULL)
-               unregister_sysctl_table(kgnilnd_tunables.kgn_sysctl);
-#endif
-}
index 38bb39d..b6396d2 100644 (file)
@@ -3170,7 +3170,6 @@ static lnd_t the_o2iblnd = {
 static void __exit ko2iblnd_exit(void)
 {
        lnet_unregister_lnd(&the_o2iblnd);
 static void __exit ko2iblnd_exit(void)
 {
        lnet_unregister_lnd(&the_o2iblnd);
-       kiblnd_tunables_fini();
 }
 
 static int __init ko2iblnd_init(void)
 }
 
 static int __init ko2iblnd_init(void)
index 3a8d5f6..23cc03c 100644 (file)
@@ -103,9 +103,6 @@ typedef struct
        int              *kib_retry_count;
        int              *kib_rnr_retry_count;
        int              *kib_ib_mtu;           /* IB MTU */
        int              *kib_retry_count;
        int              *kib_rnr_retry_count;
        int              *kib_ib_mtu;           /* IB MTU */
-#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-       struct ctl_table_header *kib_sysctl;  /* sysctl interface */
-#endif
        int              *kib_require_priv_port;/* accept only privileged ports */
        int              *kib_use_priv_port;    /* use privileged port for active connect */
        /* # threads on each CPT */
        int              *kib_require_priv_port;/* accept only privileged ports */
        int              *kib_use_priv_port;    /* use privileged port for active connect */
        /* # threads on each CPT */
@@ -1160,7 +1157,6 @@ void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status);
 
 int  kiblnd_tunables_setup(struct lnet_ni *ni);
 int  kiblnd_tunables_init(void);
 
 int  kiblnd_tunables_setup(struct lnet_ni *ni);
 int  kiblnd_tunables_init(void);
-void kiblnd_tunables_fini(void);
 
 int  kiblnd_connd (void *arg);
 int  kiblnd_scheduler(void *arg);
 
 int  kiblnd_connd (void *arg);
 int  kiblnd_scheduler(void *arg);
index fa063e5..d542bc3 100644 (file)
@@ -161,226 +161,6 @@ kib_tunables_t kiblnd_tunables = {
 
 static struct lnet_ioctl_config_o2iblnd_tunables default_tunables;
 
 
 static struct lnet_ioctl_config_o2iblnd_tunables default_tunables;
 
-#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-
-static char ipif_basename_space[32];
-
-static struct ctl_table kiblnd_ctl_table[] = {
-       {
-               INIT_CTL_NAME
-               .procname       = "service",
-               .data           = &service,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "cksum",
-               .data           = &cksum,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "timeout",
-               .data           = &timeout,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "ntx",
-               .data           = &ntx,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "credits",
-               .data           = &credits,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_credits",
-               .data           = &peer_credits,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_credits_hiw",
-               .data           = &peer_credits_hiw,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_buffer_credits",
-               .data           = &peer_buffer_credits,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_timeout",
-               .data           = &peer_timeout,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "ipif_name",
-               .data           = ipif_basename_space,
-               .maxlen         = sizeof(ipif_basename_space),
-               .mode           = 0444,
-               .proc_handler   = &proc_dostring
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "retry_count",
-               .data           = &retry_count,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "rnr_retry_count",
-               .data           = &rnr_retry_count,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "keepalive",
-               .data           = &keepalive,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "concurrent_sends",
-               .data           = &concurrent_sends,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "ib_mtu",
-               .data           = &ib_mtu,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "map_on_demand",
-               .data           = &map_on_demand,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "fmr_pool_size",
-               .data           = &fmr_pool_size,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "fmr_flush_trigger",
-               .data           = &fmr_flush_trigger,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "fmr_cache",
-               .data           = &fmr_cache,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "dev_failover",
-               .data           = &dev_failover,
-               .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-       },
-       { 0 }
-};
-
-static struct ctl_table kiblnd_top_ctl_table[] = {
-       {
-               INIT_CTL_NAME
-               .procname       = "o2iblnd",
-               .data           = NULL,
-               .maxlen         = 0,
-               .mode           = 0555,
-               .child          = kiblnd_ctl_table
-       },
-       { 0 }
-};
-
-void
-kiblnd_initstrtunable(char *space, char *str, int size)
-{
-        strncpy(space, str, size);
-        space[size-1] = 0;
-}
-
-static void
-kiblnd_sysctl_init (void)
-{
-       kiblnd_initstrtunable(ipif_basename_space, ipif_name,
-                             sizeof(ipif_basename_space));
-
-       kiblnd_tunables.kib_sysctl =
-               register_sysctl_table(kiblnd_top_ctl_table);
-
-       if (kiblnd_tunables.kib_sysctl == NULL)
-               CWARN("Can't setup /proc tunables\n");
-}
-
-static void
-kiblnd_sysctl_fini (void)
-{
-       if (kiblnd_tunables.kib_sysctl != NULL)
-               unregister_sysctl_table(kiblnd_tunables.kib_sysctl);
-}
-
-#else
-
-static void
-kiblnd_sysctl_init (void)
-{
-}
-
-static void
-kiblnd_sysctl_fini (void)
-{
-}
-#endif
-
 /* # messages/RDMAs in-flight */
 int
 kiblnd_msg_queue_size(int version, lnet_ni_t *ni)
 /* # messages/RDMAs in-flight */
 int
 kiblnd_msg_queue_size(int version, lnet_ni_t *ni)
@@ -505,13 +285,5 @@ kiblnd_tunables_init(void)
        default_tunables.lnd_fmr_pool_size = fmr_pool_size;
        default_tunables.lnd_fmr_flush_trigger = fmr_flush_trigger;
        default_tunables.lnd_fmr_cache = fmr_cache;
        default_tunables.lnd_fmr_pool_size = fmr_pool_size;
        default_tunables.lnd_fmr_flush_trigger = fmr_flush_trigger;
        default_tunables.lnd_fmr_cache = fmr_cache;
-
-       kiblnd_sysctl_init();
        return 0;
 }
        return 0;
 }
-
-void
-kiblnd_tunables_fini(void)
-{
-       kiblnd_sysctl_fini();
-}
index 3c50e5c..15d9ed1 100644 (file)
@@ -2866,7 +2866,6 @@ ksocknal_startup (lnet_ni_t *ni)
 static void __exit ksocklnd_exit(void)
 {
        lnet_unregister_lnd(&the_ksocklnd);
 static void __exit ksocklnd_exit(void)
 {
        lnet_unregister_lnd(&the_ksocklnd);
-       ksocknal_tunables_fini();
 }
 
 static int __init ksocklnd_init(void)
 }
 
 static int __init ksocklnd_init(void)
index 4065ef3..f02003a 100644 (file)
@@ -172,9 +172,6 @@ typedef struct
 #if SOCKNAL_VERSION_DEBUG
         int              *ksnd_protocol;        /* protocol version */
 #endif
 #if SOCKNAL_VERSION_DEBUG
         int              *ksnd_protocol;        /* protocol version */
 #endif
-#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-       struct ctl_table_header *ksnd_sysctl;   /* sysctl interface */
-#endif
 } ksock_tunables_t;
 
 typedef struct
 } ksock_tunables_t;
 
 typedef struct
@@ -681,9 +678,6 @@ extern int ksocknal_lib_get_conn_tunables(ksock_conn_t *conn, int *txmem,
                                          int *rxmem, int *nagle);
 
 extern int ksocknal_tunables_init(void);
                                          int *rxmem, int *nagle);
 
 extern int ksocknal_tunables_init(void);
-extern void ksocknal_tunables_fini(void);
-extern int ksocknal_lib_tunables_init(void);
-extern void ksocknal_lib_tunables_fini(void);
 
 extern void ksocknal_lib_csum_tx(ksock_tx_t *tx);
 
 
 extern void ksocknal_lib_csum_tx(ksock_tx_t *tx);
 
index f270fa7..9dca0e4 100644 (file)
 
 #include "socklnd.h"
 
 
 #include "socklnd.h"
 
-# if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-
-static struct ctl_table ksocknal_ctl_table[] = {
-       {
-               INIT_CTL_NAME
-               .procname       = "timeout",
-               .data           = &ksocknal_tunables.ksnd_timeout,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "credits",
-               .data           = &ksocknal_tunables.ksnd_credits,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_credits",
-               .data           = &ksocknal_tunables.ksnd_peertxcredits,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_buffer_credits",
-               .data           = &ksocknal_tunables.ksnd_peerrtrcredits,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "peer_timeout",
-               .data           = &ksocknal_tunables.ksnd_peertimeout,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "nconnds",
-               .data           = &ksocknal_tunables.ksnd_nconnds,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "min_reconnectms",
-               .data           = &ksocknal_tunables.ksnd_min_reconnectms,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "max_reconnectms",
-               .data           = &ksocknal_tunables.ksnd_max_reconnectms,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "eager_ack",
-               .data           = &ksocknal_tunables.ksnd_eager_ack,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "zero_copy",
-               .data           = &ksocknal_tunables.ksnd_zc_min_payload,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "zero_copy_recv",
-               .data           = &ksocknal_tunables.ksnd_zc_recv,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "zero_copy_recv",
-               .data           = &ksocknal_tunables.ksnd_zc_recv_min_nfrags,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "typed",
-               .data           = &ksocknal_tunables.ksnd_typed_conns,
-               .maxlen         = sizeof (int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "min_bulk",
-               .data           = &ksocknal_tunables.ksnd_min_bulk,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "rx_buffer_size",
-               .data           = &ksocknal_tunables.ksnd_rx_buffer_size,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "tx_buffer_size",
-               .data           = &ksocknal_tunables.ksnd_tx_buffer_size,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "nagle",
-               .data           = &ksocknal_tunables.ksnd_nagle,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-#ifdef CPU_AFFINITY
-       {
-               INIT_CTL_NAME
-               .procname       = "irq_affinity",
-               .data           = &ksocknal_tunables.ksnd_irq_affinity,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-#endif
-       {
-               INIT_CTL_NAME
-               .procname       = "round_robin",
-               .data           = &ksocknal_tunables.ksnd_round_robin,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "keepalive",
-               .data           = &ksocknal_tunables.ksnd_keepalive,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "keepalive_idle",
-               .data           = &ksocknal_tunables.ksnd_keepalive_idle,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "keepalive_count",
-               .data           = &ksocknal_tunables.ksnd_keepalive_count,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "keepalive_intvl",
-               .data           = &ksocknal_tunables.ksnd_keepalive_intvl,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-#ifdef SOCKNAL_BACKOFF
-       {
-               INIT_CTL_NAME
-               .procname       = "backoff_init",
-               .data           = &ksocknal_tunables.ksnd_backoff_init,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-       {
-               INIT_CTL_NAME
-               .procname       = "backoff_max",
-               .data           = &ksocknal_tunables.ksnd_backoff_max,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-#endif
-#if SOCKNAL_VERSION_DEBUG
-       {
-               INIT_CTL_NAME
-               .procname       = "protocol",
-               .data           = &ksocknal_tunables.ksnd_protocol,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-               INIT_STRATEGY
-       },
-#endif
-       { 0 }
-};
-
-struct ctl_table ksocknal_top_ctl_table[] = {
-       {
-               INIT_CTL_NAME
-               .procname       = "socknal",
-               .data           = NULL,
-               .maxlen         = 0,
-               .mode           = 0555,
-               .child          = ksocknal_ctl_table
-       },
-       { 0 }
-};
-
-int
-ksocknal_lib_tunables_init ()
-{
-       if (!*ksocknal_tunables.ksnd_typed_conns) {
-               int rc = -EINVAL;
-#if SOCKNAL_VERSION_DEBUG
-               if (*ksocknal_tunables.ksnd_protocol < 3)
-                       rc = 0;
-#endif
-               if (rc != 0) {
-                       CERROR("Protocol V3.x MUST have typed connections\n");
-                       return rc;
-               }
-       }
-
-       if (*ksocknal_tunables.ksnd_zc_recv_min_nfrags < 2)
-               *ksocknal_tunables.ksnd_zc_recv_min_nfrags = 2;
-       if (*ksocknal_tunables.ksnd_zc_recv_min_nfrags > LNET_MAX_IOV)
-               *ksocknal_tunables.ksnd_zc_recv_min_nfrags = LNET_MAX_IOV;
-
-       ksocknal_tunables.ksnd_sysctl =
-               register_sysctl_table(ksocknal_top_ctl_table);
-
-       if (ksocknal_tunables.ksnd_sysctl == NULL)
-               CWARN("Can't setup /proc tunables\n");
-
-       return 0;
-}
-
-void
-ksocknal_lib_tunables_fini ()
-{
-       if (ksocknal_tunables.ksnd_sysctl != NULL)
-               unregister_sysctl_table(ksocknal_tunables.ksnd_sysctl);
-}
-#else
-int
-ksocknal_lib_tunables_init ()
-{
-        return 0;
-}
-
-void
-ksocknal_lib_tunables_fini ()
-{
-}
-#endif /* # if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM */
-
 int
 ksocknal_lib_get_conn_addrs (ksock_conn_t *conn)
 {
 int
 ksocknal_lib_get_conn_addrs (ksock_conn_t *conn)
 {
index aab22f0..6495703 100644 (file)
@@ -208,18 +208,8 @@ int ksocknal_tunables_init(void)
         ksocknal_tunables.ksnd_protocol           = &protocol;
 #endif
 
         ksocknal_tunables.ksnd_protocol           = &protocol;
 #endif
 
-#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-        ksocknal_tunables.ksnd_sysctl             =  NULL;
-#endif
-
         if (*ksocknal_tunables.ksnd_zc_min_payload < (2 << 10))
                 *ksocknal_tunables.ksnd_zc_min_payload = (2 << 10);
 
         if (*ksocknal_tunables.ksnd_zc_min_payload < (2 << 10))
                 *ksocknal_tunables.ksnd_zc_min_payload = (2 << 10);
 
-        /* initialize platform-sepcific tunables */
-        return ksocknal_lib_tunables_init();
+       return 0;
 };
 };
-
-void ksocknal_tunables_fini(void)
-{
-        ksocknal_lib_tunables_fini();
-}