From nobody Tue Nov 12 23:19:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xp2SM4JnDz5cmwr; Tue, 12 Nov 2024 23:19:47 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xp2SM3g0Tz4ZMh; Tue, 12 Nov 2024 23:19:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731453587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvGZaExDsJx+Dlht9cA/lpYmtqspPfj0Qa0Iz+HU8fw=; b=ujN1oY8W75eNaTDxKJRsjy6d5qa2ElXmYlBPO/KwMNTgpOZtu6ikwY0VmHD+T6gfRofRt7 Q52h3F2nXTzDcENjBpfTzfU+iKz6aV2pJydoqW0mzQaK5hZT+CecFTspKXF6DghcptGuwj /dMD9kE31Uj9KAwP/fqWZJF1jv6Fj9TICEf6xc3b7ByjHdh+tBWnDt641pYxuJmV8shlOU nKPed+QMetgwpDJC6IOFhuRoP5uRP2omz7ubnr4WvalxxIKzdTSb4VwO6kllm+gwqdWh35 0GxroC7aMFHkecdHPjmaTmoVu5Gs9fyVMvVNCrKsXCbvGLUALvQGcvH/RpdWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731453587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvGZaExDsJx+Dlht9cA/lpYmtqspPfj0Qa0Iz+HU8fw=; b=btVK0YCfZRX76cKL8fnoPH5aC70Q3yQB09Xbb2AanKOt/v5kuEnT9kOkMnIvDtwrVjQ6i2 LJzdrLSvyFYvso2WzGtHviMQ5bTRdgCIH+MwGTg9ZRPZi+pHCVNITVahD+EHjeMUa33Cqg mVP+gspv3vilDh+NAuRQAAP0IlKCljRzvbIhy8N7Hm/CTmAv1ARP6IVxjpd7iPGSIp+V7+ z2LRibjGQVcAtyW9LYp38c7Fw8aPLwTQq9Keq3CFiNMBFiXmgM6LbXA9XUk44o+0580Jkl 4nVyRGEdn1E8aHv1UNXHijHCugd584bRKHWIRoRh2+aMIOIuxbyEzOTC4+uuFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731453587; a=rsa-sha256; cv=none; b=jPs7IJ0e+6vNMw+kX5UL4aXSFoec0ALc0oPSqR+cWPuxNCMQhdl+fGgiOMBS1EsNir/q7T JhlHuMESODQqWpqGKbFc1Dzg3fLdSPdkiHGEICkmS6vjpy2Me9QzKva9OuiVsxPiHL6NKT 7JwugKrTGxjWklK5RDP3Be0M7ER7PsO2Fj7gAPZ6s0aZ7J/dw89ySai1GXVf8RryJW3j8j 9Ye+xxJwQiQVSCq2VhAFAFNh1aQH4DtNQEh5Wnts+FTyhAeoyYGy2bLPThMqAKsHGQkwGj oHmBpDqgOFOaFW9PPQrDYMV8Ai8EAtzpNKYmuvRV3PHxBr3kla+s1L7pX7rCZw== 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 4Xp2SM38QpzVwl; Tue, 12 Nov 2024 23:19:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACNJlnC084813; Tue, 12 Nov 2024 23:19:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACNJlQY084810; Tue, 12 Nov 2024 23:19:47 GMT (envelope-from git) Date: Tue, 12 Nov 2024 23:19:47 GMT Message-Id: <202411122319.4ACNJlQY084810@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: c57dc755fa1a - stable/14 - device_pager: rename the un_pager.devp.dev field to handle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/14 X-Git-Reftype: branch X-Git-Commit: c57dc755fa1a8bb0a4190f60df02b2bce5b8033c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c57dc755fa1a8bb0a4190f60df02b2bce5b8033c commit c57dc755fa1a8bb0a4190f60df02b2bce5b8033c Author: Konstantin Belousov AuthorDate: 2024-11-04 22:10:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-12 23:19:18 +0000 device_pager: rename the un_pager.devp.dev field to handle (cherry picked from commit f0c07fe3d0007a4499f81583a99598cd0a74d45b) --- sys/kern/kern_proc.c | 2 +- sys/vm/device_pager.c | 20 ++++++++++---------- sys/vm/vm_object.c | 2 +- sys/vm/vm_object.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b8bc1a7e5dfe..18302bb8abae 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2720,7 +2720,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_shadow_count = obj->shadow_count; if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { - cdev = obj->un_pager.devp.dev; + cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); if (csw != NULL) { diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index cb3b0e522d9a..bceff38a41c3 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -121,8 +121,8 @@ cdev_pager_lookup(void *handle) again: mtx_lock(&dev_pager_mtx); object = vm_pager_object_lookup(&dev_pager_object_list, handle); - if (object != NULL && object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, &dev_pager_mtx, + if (object != NULL && object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -186,8 +186,8 @@ again: object1->type = OBJT_DEAD; vm_object_deallocate(object1); object1 = NULL; - if (object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, + if (object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -221,7 +221,7 @@ again: mtx_lock(&dev_pager_mtx); TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); - wakeup(&object->un_pager.devp.dev); + wakeup(&object->un_pager.devp.handle); mtx_unlock(&dev_pager_mtx); object->type = OBJT_DEAD; vm_object_deallocate(object); @@ -231,14 +231,14 @@ again: mtx_lock(&dev_pager_mtx); object->flags |= OBJ_COLORED; object->pg_color = color; - object->un_pager.devp.dev = handle; - wakeup(&object->un_pager.devp.dev); + object->un_pager.devp.handle = handle; + wakeup(&object->un_pager.devp.handle); } } MPASS(object1 == NULL); } else { - if (object->un_pager.devp.dev == NULL) { - msleep(&object->un_pager.devp.dev, + if (object->un_pager.devp.handle == NULL) { + msleep(&object->un_pager.devp.handle, &dev_pager_mtx, PVM | PDROP, "cdplkp", 0); vm_object_deallocate(object); goto again; @@ -292,7 +292,7 @@ dev_pager_dealloc(vm_object_t object) vm_page_t m; VM_OBJECT_WUNLOCK(object); - object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.dev); + object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.handle); mtx_lock(&dev_pager_mtx); TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 06dae7de3baa..5933b2c1d4bd 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2611,7 +2611,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { - cdev = obj->un_pager.devp.dev; + cdev = obj->un_pager.devp.handle; if (cdev != NULL) { csw = dev_refthread(cdev, &ref); if (csw != NULL) { diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 9921f1130e8c..16ee3544b658 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -139,7 +139,7 @@ struct vm_object { struct { TAILQ_HEAD(, vm_page) devp_pglist; const struct cdev_pager_ops *ops; - struct cdev *dev; + void *handle; } devp; /*