Whamcloud - gitweb
b=21983 Use CFS_ALLOC_IO instead of _STD in llap_from_page_with_lockh
authorDmitry Zogin <dmitry.zogin@sun.com>
Tue, 9 Mar 2010 14:48:23 +0000 (09:48 -0500)
committerJohann Lombardi <johann@sun.com>
Wed, 10 Mar 2010 09:40:08 +0000 (10:40 +0100)
During an ll_readahead under ll_readpage, we have seen the the
OBD_SLAB_ALLOC hang under ldlm_pools_shrink when trying to lock
a page that is already locked by the readahead code.

Using CFS_ALLOC_IO instead of CFS_ALLOC_STD will prevent
ldlm_pools_shrink from actually freeing slab, so the call path
that blocks indefinitely can never happen.

 i=adilger
 i=dmitry.zogin
 i=johann

lustre/llite/rw.c

index fd775e7..8e314c3 100644 (file)
@@ -860,7 +860,7 @@ static struct ll_async_page *llap_from_page_with_lockh(struct page *page,
         }
         cfs_put_cpu();
 
-        OBD_SLAB_ALLOC(llap, ll_async_page_slab, CFS_ALLOC_STD,
+        OBD_SLAB_ALLOC(llap, ll_async_page_slab, CFS_ALLOC_IO,
                        ll_async_page_slab_size);
         if (llap == NULL)
                 RETURN(ERR_PTR(-ENOMEM));