summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include
diff options
context:
space:
mode:
authorAmir Shehata <amir.shehata@intel.com>2016-02-15 10:25:53 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 14:29:23 -0800
commit86ef6250fcce86403b322d4eb10d551c9f9b6d25 (patch)
tree75668ed5488d81d270c47ea0d6de830bed5eae07 /drivers/staging/lustre/include
parent21602c7db4cfb296911b842365fde8a2edc02da2 (diff)
downloadop-kernel-dev-86ef6250fcce86403b322d4eb10d551c9f9b6d25.zip
op-kernel-dev-86ef6250fcce86403b322d4eb10d551c9f9b6d25.tar.gz
staging: lustre: Dynamic LNet Configuration (DLC) dynamic routing
This is the second patch of a set of patches that enables DLC. This patch adds the following features to LNET. Currently these features are not driven by user space. - Enabling Routing on Demand. The default number of router buffers are allocated. - Disable Routing on demand. Unused router buffers are freed and used router buffers are freed when they are no longer in use. The following time routing is enabled the default router buffer values are used. It has been decided that remembering the user set router buffer values should be remembered and re-set by user space scripts. - Increase the number of router buffers on demand, by allocating new ones. - Decrease the number of router buffers. Exccess buffers are freed if they are not in use. Otherwise they are freed once they are no longer in use. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2456 Change-Id: Id07d4ad424d8f5ba72475d4149380afe2ac54e77 Reviewed-on: http://review.whamcloud.com/9831 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include')
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-lnet.h8
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-types.h8
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 77d8e37..3a1cf61 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -461,7 +461,11 @@ int lnet_get_route(int idx, __u32 *net, __u32 *hops,
void lnet_router_debugfs_init(void);
void lnet_router_debugfs_fini(void);
int lnet_rtrpools_alloc(int im_a_router);
-void lnet_rtrpools_free(void);
+void lnet_destroy_rtrbuf(lnet_rtrbuf_t *rb, int npages);
+int lnet_rtrpools_adjust(int tiny, int small, int large);
+int lnet_rtrpools_enable(void);
+void lnet_rtrpools_disable(void);
+void lnet_rtrpools_free(int keep_pools);
lnet_remotenet_t *lnet_find_net_locked(__u32 net);
int lnet_islocalnid(lnet_nid_t nid);
@@ -481,6 +485,8 @@ void lnet_prep_send(lnet_msg_t *msg, int type, lnet_process_id_t target,
int lnet_send(lnet_nid_t nid, lnet_msg_t *msg, lnet_nid_t rtr_nid);
void lnet_return_tx_credits_locked(lnet_msg_t *msg);
void lnet_return_rx_credits_locked(lnet_msg_t *msg);
+void lnet_schedule_blocked_locked(lnet_rtrbufpool_t *rbp);
+void lnet_drop_routed_msgs_locked(struct list_head *list, int cpt);
/* portals functions */
/* portals attributes */
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index be650d4..b0ba9d8 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -285,6 +285,7 @@ typedef struct lnet_ni {
#define LNET_PING_FEAT_INVAL (0) /* no feature */
#define LNET_PING_FEAT_BASE (1 << 0) /* just a ping */
#define LNET_PING_FEAT_NI_STATUS (1 << 1) /* return NI status */
+#define LNET_PING_FEAT_RTE_DISABLED (1 << 2) /* Routing enabled */
#define LNET_PING_FEAT_MASK (LNET_PING_FEAT_BASE | \
LNET_PING_FEAT_NI_STATUS)
@@ -410,7 +411,12 @@ typedef struct {
#define LNET_PEER_HASHSIZE 503 /* prime! */
-#define LNET_NRBPOOLS 3 /* # different router buffer pools */
+#define LNET_TINY_BUF_IDX 0
+#define LNET_SMALL_BUF_IDX 1
+#define LNET_LARGE_BUF_IDX 2
+
+/* # different router buffer pools */
+#define LNET_NRBPOOLS (LNET_LARGE_BUF_IDX + 1)
enum {
/* Didn't match anything */
OpenPOWER on IntegriCloud