Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / osc / osc_page.c
index 72d0301..29d119c 100644 (file)
@@ -541,6 +541,9 @@ void osc_io_submit_page(const struct lu_env *env,
 
         oap->oap_page_off   = opg->ops_from;
         oap->oap_count      = opg->ops_to - opg->ops_from;
+        /* Give a hint to OST that requests are coming from kswapd - bug19529 */
+        if (libcfs_memory_pressure_get())
+                oap->oap_brw_flags |= OBD_BRW_MEMALLOC;
         oap->oap_brw_flags |= OBD_BRW_SYNC;
         if (osc_io_srvlock(oio))
                 oap->oap_brw_flags |= OBD_BRW_SRVLOCK;