Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Sep 2009 17:33:51 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern kern_lock.c kern_sx.c
Message-ID:  <200909021734.n82HY9MI016744@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
attilio     2009-09-02 17:33:51 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_lock.c kern_sx.c 
  Log:
  SVN rev 196772 on 2009-09-02 17:33:51Z by attilio
  
  Fix some bugs related to adaptive spinning:
  
  In the lockmgr support:
  - GIANT_RESTORE() is just called when the sleep finishes, so the current
    code can ends up into a giant unlock problem.  Fix it by appropriately
    call GIANT_RESTORE() when needed.  Note that this is not exactly ideal
    because for any interation of the adaptive spinning we drop and restore
    Giant, but the overhead should be not a factor.
  - In the lock held in exclusive mode case, after the adaptive spinning is
    brought to completition, we should just retry to acquire the lock
    instead to fallthrough. Fix that.
  - Fix a style nit
  
  In the sx support:
  - Call GIANT_SAVE() before than looping. This saves some overhead because
    in the current code GIANT_SAVE() is called several times.
  
  Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
  
  Revision  Changes    Path
  1.146     +11 -2     src/sys/kern/kern_lock.c
  1.70      +1 -1      src/sys/kern/kern_sx.c



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