From nobody Wed Nov 06 00:23: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 4XjmCR6GjNz5bqLs; Wed, 06 Nov 2024 00:23: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 4XjmCR5jX3z4r74; Wed, 6 Nov 2024 00:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730852627; 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=87LLwNuDCOXWl02YmQKNfv0UcqFhC0Em5oxad5CKGGQ=; b=abNLKAJXxtT9FFuEo9fjQ7MgL84k3mia2iRlZteTMTyEnCVPjzsJDDKYqpJQLMX/Xf2xKs X0TTI6zZ8H+xW2scS2YqPuf+O0Z6dnnSufL+BaCL60GOMvvo1Zlm8bZVrdHvsln6Sb4+1y 1fFF4sO+87WfH0bDaHQnxWOiL4BZJCRo/6TNyRZjlVGlQQB1NVjY7eZz4zNGgFXgNSZvQz RMP0z9K7Ku18t9sbzG38cQe+NqMuPFB7tdwuuSJfnneC5Ut/6VyZSD4LtCNJYusVg0Mt9+ njuj5zJ9yxGcxQSswYkgzX/XEFJ16fqfBi5aQwd8QPFTNQ5vjT3Hmf+CMnT8jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730852627; 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=87LLwNuDCOXWl02YmQKNfv0UcqFhC0Em5oxad5CKGGQ=; b=kvmJGhmx4LH7+Kltf+JsX0Nwq3i18dn/zPVIAEr2u994o0lO7eH2wVPfwN4u2v0cePEX/1 64hN8v5a2k1w7+jycHIj48F+WF4Tq4Uavbz4HzLgK85k2tRqKMlSnBJGfhwgRyX97uM+LW Wc+9lmFjkncIZVMh0c9G9YGosh6pxLOM2ea+PVS/KeY8dxw4BfOcJOr15djndtNMXqgVbR 8Th3uuXLZdry269P9l3bKYAgqBiGUHO22uctgtPlnHXnWwvbd+qSH9oSarY3xCCygwN+Zw i3PZjOqXDZLWNRAILxT2o752SOH6LpVH6IqcZ2eIJf3hJeK34K8tvJy7anGKBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730852627; a=rsa-sha256; cv=none; b=mfPztCNArMc2MLqC9u2u1kg40XQHTo5hVqfRm2fLEZt3EhSN6UoTDiTn9ewsSgFj68/Eoy 5fgstG9umi/rBUgUOo3K1XbrLRy8yURzoejUCXgt86WthNtY3bRVkm0erMCksHVlbGBD8J KhBVquOJ02PtvrH6GBghuVPcxXumRBbr/nJnYsLxuYXUHsKtp9biNZb8/YnAcsjsgZudHX nsHm6hwjUNFZqiFcTCjtsZ3gDUhqT05Rz+Br5G4Jk9tELAnSrRMK+0ctYwHr0HDZqk9RF/ dX29VnKkw+o8H4wwipQ0hi3fJpetSkFvCCi2DAn6HHUUp1oGF5Win3A8N1xd0w== 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 4XjmCR50kmzfjZ; Wed, 6 Nov 2024 00:23: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 4A60Nlri090963; Wed, 6 Nov 2024 00:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A60Nlij090960; Wed, 6 Nov 2024 00:23:47 GMT (envelope-from git) Date: Wed, 6 Nov 2024 00:23:47 GMT Message-Id: <202411060023.4A60Nlij090960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f0c07fe3d000 - main - 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/main X-Git-Reftype: branch X-Git-Commit: f0c07fe3d0007a4499f81583a99598cd0a74d45b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0c07fe3d0007a4499f81583a99598cd0a74d45b commit f0c07fe3d0007a4499f81583a99598cd0a74d45b Author: Konstantin Belousov AuthorDate: 2024-11-04 22:10:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-06 00:10:59 +0000 device_pager: rename the un_pager.devp.dev field to handle because it is not neccessary struct cdev *. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47443 --- 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 f3ecaf4e2547..0d5b9a93d704 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2719,7 +2719,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 a5be05efc6d9..a5fffbf629bd 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -118,8 +118,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; @@ -183,8 +183,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; @@ -218,7 +218,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); @@ -228,14 +228,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; @@ -301,7 +301,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 996f7557ea9b..6d29ddf71f19 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2516,7 +2516,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 c7f0dd0943ba..596f67b46e6f 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -137,7 +137,7 @@ struct vm_object { struct { TAILQ_HEAD(, vm_page) devp_pglist; const struct cdev_pager_ops *ops; - struct cdev *dev; + void *handle; } devp; /*