Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2003 13:38:29 -0800 (PST)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/aac aac.c aacvar.h
Message-ID:  <200302192138.h1JLcTl5024205@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
scottl      2003/02/19 13:38:29 PST

  Modified files:
    sys/dev/aac          aac.c aacvar.h 
  Log:
  o Move the cleanup of the fib maps into aac_free_commands() so as to
    retain symetry with aac_alloc_commans().  Since aac_alloc_commands()
    allocates fib maps and places them onto the fib lists, aac_free_commands()
    should reverse those operations.
  
  o Combine two ifs with the same body with an ||.
  
  o Switch from uintptr_t to uint32_t for fib map load operations.
    The target is a uint32_t so using this type for the map load call
    avoids an extra cast.  uintptr_t should only be used when you need
    an "int sized the same as the machine's poitner size" which is not
    the case here.
  
  o Removed the commented out M_WAITOK flag in the allocation in
    aac_alloc_commands().  The kernel will only block in the allocator
    if it can grow the size of the kernel.  This usually results in a
    page-out which could involve this aac device.  Thus, sleeping here
    could deadlock the machine.  Assuming this operation is occurring outside
    of attach time, we have enough fibs to operate anyway, so waiting for
    fibs to free up is okay if not optimal.
  
  o In aac_alloc_commands(), if we cannot dmamem_alloc additional fib
    space, free the fib map.
  
  o In aac_alloc_commands(), if we cannot create per-command dmamaps, don't
    lose track of the fib map that is mapping all of the commands that we
    have already released into the free pool.  Instead, just cut out of
    the loop and modify aac_free_commands to not attempt to free maps that
    have not been allocated.
  
  o Don't use a magic number when pre-allocating fibs.
  
  o Use PAGE_SIZE to allocate in page sized chunks instead of an
    architecture specific constant.
  
  Submitted by: gibbs
  
  Revision  Changes    Path
  1.53      +40 -32    src/sys/dev/aac/aac.c
  1.25      +2 -1      src/sys/dev/aac/aacvar.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302192138.h1JLcTl5024205>