From owner-svn-src-head@freebsd.org Thu Feb 6 08:32:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33D362463F9; Thu, 6 Feb 2020 08:32:26 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48CsB20cDtz3JBQ; Thu, 6 Feb 2020 08:32:26 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1036518F64; Thu, 6 Feb 2020 08:32:26 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0168WPrn040511; Thu, 6 Feb 2020 08:32:25 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0168WPh4040508; Thu, 6 Feb 2020 08:32:25 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202002060832.0168WPh4040508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 6 Feb 2020 08:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357610 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2020 08:32:26 -0000 Author: rlibby Date: Thu Feb 6 08:32:25 2020 New Revision: 357610 URL: https://svnweb.freebsd.org/changeset/base/357610 Log: uma: remove UMA_ZFLAG_CACHEONLY flag UMA_ZFLAG_CACHEONLY was essentially the same thing as UMA_ZONE_VM, but with a more confusing name. Remove the flag, make UMA_ZONE_VM an inherit flag, and replace all references. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23516 Modified: head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Thu Feb 6 07:47:28 2020 (r357609) +++ head/sys/vm/uma.h Thu Feb 6 08:32:25 2020 (r357610) @@ -288,8 +288,8 @@ uma_zone_t uma_zcache_create(char *name, int size, uma */ #define UMA_ZONE_INHERIT \ (UMA_ZONE_NOTOUCH | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \ - UMA_ZONE_NOTPAGE | UMA_ZONE_PCPU | UMA_ZONE_FIRSTTOUCH | \ - UMA_ZONE_ROUNDROBIN) + UMA_ZONE_VM | UMA_ZONE_NOTPAGE | UMA_ZONE_PCPU | \ + UMA_ZONE_FIRSTTOUCH | UMA_ZONE_ROUNDROBIN) /* Definitions for align */ #define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Feb 6 07:47:28 2020 (r357609) +++ head/sys/vm/uma_core.c Thu Feb 6 08:32:25 2020 (r357610) @@ -493,7 +493,7 @@ bucket_alloc(uma_zone_t zone, void *udata, int flags) return (NULL); udata = (void *)((uintptr_t)udata | UMA_ZFLAG_BUCKET); } - if ((uintptr_t)udata & UMA_ZFLAG_CACHEONLY) + if (((uintptr_t)udata & UMA_ZONE_VM) != 0) flags |= M_NOVM; ubz = bucket_zone_lookup(zone->uz_bucket_size); if (ubz->ubz_zone == zone && (ubz + 1)->ubz_entries != 0) @@ -1897,8 +1897,7 @@ keg_layout(uma_keg_t keg) ("%s: cannot configure for PCPU: keg=%s, size=%u, flags=0x%b", __func__, keg->uk_name, keg->uk_size, keg->uk_flags, PRINT_UMA_ZFLAGS)); - KASSERT((keg->uk_flags & - (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY)) == 0 || + KASSERT((keg->uk_flags & (UMA_ZFLAG_INTERNAL | UMA_ZONE_VM)) == 0 || (keg->uk_flags & (UMA_ZONE_NOTOUCH | UMA_ZONE_PCPU)) == 0, ("%s: incompatible flags 0x%b", __func__, keg->uk_flags, PRINT_UMA_ZFLAGS)); @@ -1947,16 +1946,16 @@ keg_layout(uma_keg_t keg) /* * We can't do OFFPAGE if we're internal or if we've been * asked to not go to the VM for buckets. If we do this we - * may end up going to the VM for slabs which we do not - * want to do if we're UMA_ZFLAG_CACHEONLY as a result - * of UMA_ZONE_VM, which clearly forbids it. In those cases, - * evaluate a pseudo-format called INTERNAL which has an inline - * slab header and one extra page to guarantee that it fits. + * may end up going to the VM for slabs which we do not want + * to do if we're UMA_ZONE_VM, which clearly forbids it. + * In those cases, evaluate a pseudo-format called INTERNAL + * which has an inline slab header and one extra page to + * guarantee that it fits. * * Otherwise, see if using an OFFPAGE slab will improve our * efficiency. */ - if ((keg->uk_flags & (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY)) != 0) + if ((keg->uk_flags & (UMA_ZFLAG_INTERNAL | UMA_ZONE_VM)) != 0) fmts[nfmt++] = UMA_ZFLAG_INTERNAL; else fmts[nfmt++] = UMA_ZFLAG_OFFPAGE; @@ -2073,9 +2072,6 @@ keg_ctor(void *mem, int size, void *udata, int flags) zone = arg->zone; keg->uk_name = zone->uz_name; - if (arg->flags & UMA_ZONE_VM) - keg->uk_flags |= UMA_ZFLAG_CACHEONLY; - if (arg->flags & UMA_ZONE_ZINIT) keg->uk_init = zero_init; @@ -2461,8 +2457,6 @@ zone_ctor(void *mem, int size, void *udata, int flags) if (arg->import) { KASSERT((arg->flags & UMA_ZFLAG_CACHE) != 0, ("zone_ctor: Import specified for non-cache zone.")); - if (arg->flags & UMA_ZONE_VM) - arg->flags |= UMA_ZFLAG_CACHEONLY; zone->uz_flags = arg->flags; zone->uz_size = arg->size; zone->uz_import = arg->import; Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Thu Feb 6 07:47:28 2020 (r357609) +++ head/sys/vm/uma_int.h Thu Feb 6 08:32:25 2020 (r357610) @@ -166,14 +166,12 @@ #define UMA_ZFLAG_BUCKET 0x10000000 /* Bucket zone. */ #define UMA_ZFLAG_INTERNAL 0x20000000 /* No offpage no PCPU. */ #define UMA_ZFLAG_TRASH 0x40000000 /* Add trash ctor/dtor. */ -#define UMA_ZFLAG_CACHEONLY 0x80000000 /* Don't ask VM for buckets. */ #define UMA_ZFLAG_INHERIT \ (UMA_ZFLAG_OFFPAGE | UMA_ZFLAG_HASH | UMA_ZFLAG_VTOSLAB | \ - UMA_ZFLAG_BUCKET | UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY) + UMA_ZFLAG_BUCKET | UMA_ZFLAG_INTERNAL) #define PRINT_UMA_ZFLAGS "\20" \ - "\40CACHEONLY" \ "\37TRASH" \ "\36INTERNAL" \ "\35BUCKET" \