+ /**
+ * serialize the following fields, used for protecting
+ * rqbd list and incoming requests waiting for preprocess
+ */
+ cfs_spinlock_t srv_lock __cfs_cacheline_aligned;
+ /** incoming reqs */
+ cfs_list_t srv_req_in_queue;
+ /** total # req buffer descs allocated */
+ int srv_nbufs;
+ /** # posted request buffers */
+ int srv_nrqbd_receiving;
+ /** timeout before re-posting reqs, in tick */
+ cfs_duration_t srv_rqbd_timeout;
+ /** request buffers to be reposted */
+ cfs_list_t srv_idle_rqbds;
+ /** req buffers receiving */
+ cfs_list_t srv_active_rqbds;
+ /** request buffer history */
+ cfs_list_t srv_history_rqbds;
+ /** # request buffers in history */
+ int srv_n_history_rqbds;
+ /** max # request buffers in history */
+ int srv_max_history_rqbds;
+ /** request history */
+ cfs_list_t srv_request_history;
+ /** next request sequence # */
+ __u64 srv_request_seq;
+ /** highest seq culled from history */
+ __u64 srv_request_max_cull_seq;
+ /**
+ * all threads sleep on this. This wait-queue is signalled when new
+ * incoming request arrives and when difficult reply has to be handled.
+ */
+ cfs_waitq_t srv_waitq;
+
+ /**
+ * serialize the following fields, used for processing requests
+ * sent to this portal
+ */
+ cfs_spinlock_t srv_rq_lock __cfs_cacheline_aligned;
+ /** # reqs in either of the queues below */
+ /** reqs waiting for service */
+ cfs_list_t srv_request_queue;
+ /** high priority queue */
+ cfs_list_t srv_request_hpq;
+ /** # incoming reqs */
+ int srv_n_queued_reqs;
+ /** # reqs being served */
+ int srv_n_active_reqs;
+ /** # HPreqs being served */
+ int srv_n_active_hpreq;
+ /** # hp requests handled */
+ int srv_hpreq_count;
+
+ /** AT stuff */
+ /** @{ */
+ /**
+ * serialize the following fields, used for changes on
+ * adaptive timeout
+ */
+ cfs_spinlock_t srv_at_lock __cfs_cacheline_aligned;
+ /** estimated rpc service time */
+ struct adaptive_timeout srv_at_estimate;
+ /** reqs waiting for replies */
+ struct ptlrpc_at_array srv_at_array;
+ /** early reply timer */
+ cfs_timer_t srv_at_timer;
+ /** check early replies */
+ unsigned srv_at_check;
+ /** debug */
+ cfs_time_t srv_at_checktime;
+ /** @} */
+
+ /**
+ * serialize the following fields, used for processing
+ * replies for this portal
+ */
+ cfs_spinlock_t srv_rs_lock __cfs_cacheline_aligned;
+ /** all the active replies */
+ cfs_list_t srv_active_replies;
+#ifndef __KERNEL__
+ /** replies waiting for service */
+ cfs_list_t srv_reply_queue;
+#endif
+ /** List of free reply_states */
+ cfs_list_t srv_free_rs_list;
+ /** waitq to run, when adding stuff to srv_free_rs_list */
+ cfs_waitq_t srv_free_rs_waitq;
+ /** # 'difficult' replies */
+ cfs_atomic_t srv_n_difficult_replies;