OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-1891-gc904d9a

Gerrit Code Review gerrit@openafs.org
Wed, 16 Nov 2011 06:06:25 -0800 (PST)


The following commit has been merged in the master branch:
commit c904d9a3889b7dd8c8795feaa9e5e4979f681f53
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.
    
    Change-Id: I95d9d1f14dbe0c7d717e6a7253ccfb10a9fac851
    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>

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

-- 
OpenAFS Master Repository