cvs commit: src/sys/kern kern_lockf.c

Joerg Sonnenberger joerg at crater.dragonflybsd.org
Tue May 4 10:01:25 PDT 2004


joerg       2004/05/04 10:00:55 PDT

DragonFly src repository

  Modified files:
    sys/kern             kern_lockf.c 
  Log:
  Fix races in lf_getlock and lf_clearlock when waiting for memory.
  
  The current solution pre-allocates memory in the beginning of both
  functions and frees unused before returning. If this is too costly,
  keeping the last two lockf_range allocations in a per-CPU cache can
  improve the performance further with minimal code changes.
  
  Revision  Changes    Path
  1.8       +84 -35    src/sys/kern/kern_lockf.c


http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_lockf.c.diff?r1=1.7&r2=1.8&f=h





More information about the Commits mailing list