Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2008 11:21:54 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/compat/opensolaris/kern opensolaris_kmem.c src/sys/compat/opensolaris/sys kmem.h
Message-ID:  <200801241121.m0OBLtRw030186@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
pjd         2008-01-24 11:21:54 UTC

  FreeBSD src repository

  Modified files:
    sys/compat/opensolaris/kern opensolaris_kmem.c 
    sys/compat/opensolaris/sys kmem.h 
  Log:
  Change type of kmem_used() and kmem_size() functions to uint64_t, so it
  doesn't overflow in arc.c in this check:
  
          if (kmem_used() > (kmem_size() * 4) / 5)
                  return (1);
  
  With this bug ZFS almost doesn't cache.
  
  Only 32bit machines are affected that have vm.kmem_size set to values >=1GB.
  
  Reported by:    David Taylor <davidt@yadt.co.uk>
  
  Revision  Changes    Path
  1.3       +5 -5      src/sys/compat/opensolaris/kern/opensolaris_kmem.c
  1.4       +3 -3      src/sys/compat/opensolaris/sys/kmem.h



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