From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: [PATCH v3 04/13] staging/rdma/hfi1: Add definitions needed for TID caching support
Date: Fri, 5 Feb 2016 11:57:49 -0500 [thread overview]
Message-ID: <1454691478-15444-5-git-send-email-ira.weiny@intel.com> (raw)
In-Reply-To: <1454691478-15444-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
From: Mitko Haralanov <mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
In preparation for adding the TID caching support, there is a set
of headers, structures, and variables which will be needed. This
commit adds them to the hfi.h header file.
Signed-off-by: Mitko Haralanov <mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/staging/rdma/hfi1/hfi.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/staging/rdma/hfi1/hfi.h b/drivers/staging/rdma/hfi1/hfi.h
index ddb21f0fffe7..51ecf45ef70b 100644
--- a/drivers/staging/rdma/hfi1/hfi.h
+++ b/drivers/staging/rdma/hfi1/hfi.h
@@ -179,6 +179,11 @@ struct ctxt_eager_bufs {
} *rcvtids;
};
+struct exp_tid_set {
+ struct list_head list;
+ u32 count;
+};
+
struct hfi1_ctxtdata {
/* shadow the ctxt's RcvCtrl register */
u64 rcvctrl;
@@ -247,6 +252,11 @@ struct hfi1_ctxtdata {
struct page **tid_pg_list;
/* dma handles for exp tid pages */
dma_addr_t *physshadow;
+
+ struct exp_tid_set tid_group_list;
+ struct exp_tid_set tid_used_list;
+ struct exp_tid_set tid_full_list;
+
/* lock protecting all Expected TID data */
spinlock_t exp_lock;
/* number of pio bufs for this ctxt (all procs, if shared) */
@@ -1137,6 +1147,16 @@ struct hfi1_filedata {
struct hfi1_user_sdma_pkt_q *pq;
/* for cpu affinity; -1 if none */
int rec_cpu_num;
+ struct mmu_notifier mn;
+ struct rb_root tid_rb_root;
+ spinlock_t tid_lock; /* protect tid_[limit,used] counters */
+ u32 tid_limit;
+ u32 tid_used;
+ spinlock_t rb_lock; /* protect tid_rb_root RB tree */
+ u32 *invalid_tids;
+ u32 invalid_tid_idx;
+ spinlock_t invalid_lock; /* protect the invalid_tids array */
+ int (*mmu_rb_insert)(struct rb_root *, struct mmu_rb_node *);
};
extern struct list_head hfi1_dev_list;
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-05 16:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 16:57 [PATCH v3 00/13] Implement Expected Receive TID Caching ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1454691478-15444-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-05 16:57 ` [PATCH v3 01/13] staging/rdma/hfi1: Add function stubs for TID caching ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 02/13] uapi/rdma/hfi/hfi1_user.h: Correct comment for capability bit ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 03/13] uapi/rdma/hfi/hfi1_user.h: Add command and event for TID caching ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w [this message]
2016-02-05 16:57 ` [PATCH v3 05/13] staging/rdma/hfi1: Remove un-needed variable ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 06/13] staging/rdma/hfi1: Add definitions and support functions for TID groups ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 07/13] staging/rdma/hfi1: Start adding building blocks for TID caching ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 08/13] staging/rdma/hfi1: Convert lock to mutex ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 09/13] staging/rdma/hfi1: Add Expected receive init and free functions ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 10/13] staging/rdma/hfi1: Add MMU notifier callback function ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 11/13] staging/rdma/hfi1: Add TID free/clear function bodies ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 12/13] staging/rdma/hfi1: Add TID entry program function body ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-05 16:57 ` [PATCH v3 13/13] staging/rdma/hfi1: Enable TID caching feature ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-02-18 17:12 ` [PATCH v3 00/13] Implement Expected Receive TID Caching Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454691478-15444-5-git-send-email-ira.weiny@intel.com \
--to=ira.weiny-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox