From owner-dev-commits-src-branches@freebsd.org Sat May 22 09:46:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 BECF86495A5; Sat, 22 May 2021 09:46:41 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FnJXJ36mLz3lkR; Sat, 22 May 2021 09:46:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A5FC225B2; Sat, 22 May 2021 09:46:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14M9keMJ012660; Sat, 22 May 2021 09:46:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14M9ke1m012659; Sat, 22 May 2021 09:46:40 GMT (envelope-from git) Date: Sat, 22 May 2021 09:46:40 GMT Message-Id: <202105220946.14M9ke1m012659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: bf9b8d2ae09a - stable/13 - sys/vm: remove several other uses of OBJT_SWAP_TMPFS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bf9b8d2ae09a347a9fc98d3eda6558314ba9f9ec Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2021 09:46:41 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bf9b8d2ae09a347a9fc98d3eda6558314ba9f9ec commit bf9b8d2ae09a347a9fc98d3eda6558314ba9f9ec Author: Konstantin Belousov AuthorDate: 2021-05-07 18:21:22 +0000 Commit: Konstantin Belousov CommitDate: 2021-05-22 09:38:30 +0000 sys/vm: remove several other uses of OBJT_SWAP_TMPFS (cherry picked from commit 7079449b0b56d13b4ae7b4039ac8eb7c45c03fb5) --- sys/vm/vm_object.c | 5 +++-- sys/vm/vm_pageout.c | 10 ++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 1aa05093f93a..8cb4c0006c59 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -669,7 +669,8 @@ vm_object_deallocate(vm_object_t object) umtx_shm_object_terminated(object); temp = object->backing_object; if (temp != NULL) { - KASSERT(object->type != OBJT_SWAP_TMPFS, + KASSERT(object->type == OBJT_DEFAULT || + object->type == OBJT_SWAP, ("shadowed tmpfs v_object 2 %p", object)); vm_object_backing_remove(object); } @@ -950,7 +951,7 @@ vm_object_terminate(vm_object_t object) #endif KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || - object->type == OBJT_SWAP || object->type == OBJT_SWAP_TMPFS, + (object->flags & OBJ_SWAP) != 0, ("%s: non-swap obj %p has cred", __func__, object)); /* diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 521fc4ce95f2..216e76359631 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1887,15 +1887,9 @@ vm_pageout_oom_pagecount(struct vmspace *vmspace) if ((entry->eflags & MAP_ENTRY_NEEDS_COPY) != 0 && obj->ref_count != 1) continue; - switch (obj->type) { - case OBJT_DEFAULT: - case OBJT_SWAP: - case OBJT_SWAP_TMPFS: - case OBJT_PHYS: - case OBJT_VNODE: + if (obj->type == OBJT_DEFAULT || obj->type == OBJT_PHYS || + obj->type == OBJT_VNODE || (obj->flags & OBJ_SWAP) != 0) res += obj->resident_page_count; - break; - } } return (res); }