OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_0pre4-12-gb6a4792

Gerrit Code Review
Mon, 25 Apr 2011 19:03:14 -0700 (PDT)

The following commit has been merged in the openafs-stable-1_6_x branch:
commit b6a4792b84bae661128dfa245cba541a7b9837d9
Author: Simon Wilkinson <>
Date:   Thu Apr 21 16:07:05 2011 +0100

    Linux: Restrict # of cbrs we allocate at once
    With commit a309e274632993c5aeec04c6e090f5ac95837a40, we changed the
    number of CBRs that we allocate in a chunk from 300 to 1024. However,
    this change takes the amount of memory requried to allocate a chunk
    of CBRs above PAGE_SIZE on Linux. This changes the allocator that we
    use from kmalloc to vmalloc. Whilst we can, and do, prevent kmalloc
    from flushing filesystem pages when we invoke it, we don't have a
    similar level of control over vmalloc. 1.6 only: limit it back to 300
    In one reported case, clients deadlock whilst attempting to allocate
    this memory, in a call stack that looks something like:
      afs_Daemon -> afs_ShakeLooseVCaches -> osi_TryEvictVCache
          -> afs_FlushVCache -> afs_QueueVCB -> afs_AllocCBR
          -> osi_linux_alloc -> ... -> __vmalloc_node -> ...
          -> try_to_free_pages
    This is probably because we end up deadlocking in the writeback
    invoked by try_to_free_pages, likely due to locks which are held
    by ShakeLooseVCaches.
    As a quick fix for the problem, make sure that the memory we
    allocate always fits within a page, so we always use kmalloc for
    FIXES 129751
    Tested-by: BuildBot <>
    Reviewed-by: Jeffrey Altman <>
    Reviewed-by: Derrick Brashear <>
    (cherry picked from commit 3cb97cdaa867b0d9fef84c683251a0a8f59a1519)
    Change-Id: I28a480788271eac1b69fb9704bed5c286be2c4c5
    Tested-by: BuildBot <>
    Reviewed-by: Derrick Brashear <>

 src/afs/afs.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

OpenAFS Master Repository