Whamcloud - gitweb
LU-3321 osc: Adjustment on osc LRU for performance
[fs/lustre-release.git] / lustre / osc / osc_cl_internal.h
index a8c2ec5..405db95 100644 (file)
@@ -80,6 +80,8 @@ struct osc_io {
         * page writeback from happening. */
        struct osc_extent *oi_trunc;
 
+       int oi_lru_reserved;
+
        struct obd_info    oi_info;
        struct obdo        oi_oa;
        struct osc_async_cbargs {
@@ -103,7 +105,7 @@ struct osc_session {
         struct osc_io       os_io;
 };
 
-#define OTI_PVEC_SIZE 64
+#define OTI_PVEC_SIZE 256
 struct osc_thread_info {
         struct ldlm_res_id      oti_resname;
         ldlm_policy_data_t      oti_policy;
@@ -368,21 +370,18 @@ struct osc_page {
         */
                              ops_in_lru:1,
        /**
-         * Set if the page must be transferred with OBD_BRW_SRVLOCK.
-         */
-                              ops_srvlock:1;
-       union {
-               /**
-                * lru page list. ops_inflight and ops_lru are exclusive so
-                * that they can share the same data.
-                */
-               cfs_list_t            ops_lru;
-               /**
-                * Linkage into a per-osc_object list of pages in flight. For
-                * debugging.
-                */
-               cfs_list_t            ops_inflight;
-       };
+        * Set if the page must be transferred with OBD_BRW_SRVLOCK.
+        */
+                             ops_srvlock:1;
+       /**
+        * lru page list. See osc_lru_{del|use}() in osc_page.c for usage.
+        */
+       cfs_list_t            ops_lru;
+       /**
+        * Linkage into a per-osc_object list of pages in flight. For
+        * debugging.
+        */
+       cfs_list_t            ops_inflight;
        /**
         * Thread that submitted this page for transfer. For debugging.
         */
@@ -434,6 +433,7 @@ void osc_index2policy  (ldlm_policy_data_t *policy, const struct cl_object *obj,
 int  osc_lvb_print     (const struct lu_env *env, void *cookie,
                         lu_printer_t p, const struct ost_lvb *lvb);
 
+void osc_lru_add_batch(struct client_obd *cli, cfs_list_t *list);
 void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
                     enum cl_req_type crt, int brw_flags);
 int osc_cancel_async_page(const struct lu_env *env, struct osc_page *ops);