Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2019 02:10:04 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r343926 - stable/11/sys/vm
Message-ID:  <201902090210.x192A4Ea089210@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Feb  9 02:10:03 2019
New Revision: 343926
URL: https://svnweb.freebsd.org/changeset/base/343926

Log:
  MFC r343673: Fix integer math overflow in UMA hash_alloc().
  
  512GB of ZFS ABD ARC means abd_chunk zone of 128M 4KB items.  To manage
  them UMA tries to allocate 2GB hash table, which size does not fit into
  the int variable, causing later allocation failure, which makes ARC shrink
  back below the 512GB, not letting it to use more RAM.  With this change I
  easily reached >700GB ARC size on 768GB RAM machine.
  
  Sponsored by:	iXsystems, Inc.

Modified:
  stable/11/sys/vm/uma_core.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/uma_core.c
==============================================================================
--- stable/11/sys/vm/uma_core.c	Sat Feb  9 02:09:29 2019	(r343925)
+++ stable/11/sys/vm/uma_core.c	Sat Feb  9 02:10:03 2019	(r343926)
@@ -538,7 +538,7 @@ static int
 hash_alloc(struct uma_hash *hash)
 {
 	int oldsize;
-	int alloc;
+	size_t alloc;
 
 	oldsize = hash->uh_hashsize;
 



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