OpenAFS Master Repository branch, openafs-devel-1_7_x, updated. openafs-devel-1_7_1-186-ga2a437f

Gerrit Code Review gerrit@openafs.org
Wed, 16 Nov 2011 07:17:01 -0800 (PST)


The following commit has been merged in the openafs-devel-1_7_x branch:
commit a30a3b7cb5e6185ccde0a7c4ec7c527842c1dadf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date:   Tue Nov 15 18:40:21 2011 -0500

    Windows: Fairness for background operations
    
    The background daemon worker pool is responsible for processing
    background Store and Fetch operations.  With the SMB interface
    primary store and fetch operations are performed in the SMB worker
    thread which makes sense since those operations must be synchronous
    to the incoming request.
    
    With the AFS redirector interface almost all of the work is performed
    by the background daemon worker pool.  It is therefore critical that
    the workers not get stuck in a state that starves applications.
    For example, copy of a file that is larger than the cache to \\AFS
    will result in a background store request for each chunk size of
    the file.  If each worker thread grabs one to process, only one will
    make progress and the rest will block.  If a cleanup operation
    (aka handle close) occurs the entire file will be flushed to the
    server synchronously in the redirector worker thread.  That thread
    will cause of the background daemon threads to block.
    
    Any subsequent fetch data requests that get queued behind the list
    of stores will in turn block until they clear.  This behavior is not
    fair.
    
    This patchset adds a new test to the cm_BkgDaemon() request
    selection loop, cm_RequestWillBlock().  If a request will block it
    is skipped.  If there are no requests to process that would not have
    blocked, the worker will sleep for 25ms instead of the usual 1s.
    
    For BkgStore operations, the CM_SCACHEFLAG_DATASTORING flag is
    used to indicating a blocking state.
    
    For BkgFetch and PreFetch operations, the CM_BUF_WRITING and
    CM_BUF_READING flags on the first cm_buf_t of the range is used
    to indicate a blocking state.
    
    Reviewed-on: http://gerrit.openafs.org/6056
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
    Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
    (cherry picked from commit c904d9a3889b7dd8c8795feaa9e5e4979f681f53)
    
    Change-Id: I2490f2c45b86a17cdd5bf4a86529f87509bc83ad
    Reviewed-on: http://gerrit.openafs.org/6060
    Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
    Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

 src/WINNT/afsd/cm_daemon.c |   74 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 69 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository