From nobody Wed Nov 13 18:06:50 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 4XpWSp6d3jz5cPZw; Wed, 13 Nov 2024 18:06:50 +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 4XpWSp651Jz412D; Wed, 13 Nov 2024 18:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731521210; 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=1MBNOI1f/ABEz8et2CfQPbB0GYA45xY9NCNo6cz2LTg=; b=UkOQrrLTr2f5OKihTS90ZM2O2gjmKOtnBEKyQTLuldtgp0FL72KGABsbe2egU8MKbjwO3Y yFa1/5WtrY1VkWfLsBY2PhVKgndqjJK5Lvpx8kseeVli/aogHvuBBbOzaDHfEgxF/cNGu6 os9wk94OZYIWMU+1CzGgM7QmrzJM8l5SmeD4/wNRyhXkN8GfqsIRacAN2zOxnEEbmmzytP 2TnM/1+hACF+rQ8Mcnq7DoYtPCV4ikMG3EhDuT+kRDsl3MW/djnZVWKUVM71tCYxIcURVQ bpv6IqLyBhPcSAAfJTbYoGZxuMPf4EbkZWnhSKiNh4nXw+zvrIadC92hxghQQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731521210; 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=1MBNOI1f/ABEz8et2CfQPbB0GYA45xY9NCNo6cz2LTg=; b=M4uuBmwYxJHgW5HReImlZW/wfdQCKt0P+T6BnbQsdFgB7LwnkHWJWvf+l1bQmuTfiqKela r2sZy8O7rdsVrZWuXOhMm8ubprlmIoeXj0yWzKgQ2Q83hxHzv0uPjCx97YxaN5HzSUmHQV PQucNWHEtGoAZzFwOLHH05ocWi7IwusgAiGMsw67lQDlnOCa6yYphkIoaW82mo+lBNqRDh WyvX9SYJqMgztvA8F6f3LDURimb+5B0Fj96w497FaOpitygXk9ugjnv6uUGD/7WhlCUGeP HmVMHRj6JeIcvTw94/3RPZ8nbTmrkvJSrrfbCuPIHGym3bL3z3NIgsuMz7FJzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731521210; a=rsa-sha256; cv=none; b=ZqTBrFM/10lbhqu+eKkozlJZ5KmY8/fprFYp1ufBBplkAK+it8BGO2do26E7o7BUN0CPxR 8PNYmlr0iyJgtxfpq55O8ktPzl2MBGI+QEbtfjgULjH6UnK68OwBO6Aj74M1ZID47B6cTr sMQg710eieEy+Gu4bR1LWCqS23LIW1Oxb8g1zkEtKecTPP/zKolRl/cDqrtVDlfK16v27p HJjyK/faGE+h9ElkcULAQfjik0m0Isose2xthJC9+f+kLVyVxS6/6o//Yi12aRbg+ok4Sh HA6PYUebIhhkA0B4ixfJCHr9DYv8jeDwEwvvMuf4mhKQO7XDfYZwE6oh17+PGw== 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 4XpWSp5Fx9z14nL; Wed, 13 Nov 2024 18:06:50 +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 4ADI6oO7085287; Wed, 13 Nov 2024 18:06:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADI6o2H085284; Wed, 13 Nov 2024 18:06:50 GMT (envelope-from git) Date: Wed, 13 Nov 2024 18:06:50 GMT Message-Id: <202411131806.4ADI6o2H085284@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: 300d034b3c29 - releng/14.2 - 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 300d034b3c29972c7f9e073c322a95dff510e89b Auto-Submitted: auto-generated The branch releng/14.2 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=300d034b3c29972c7f9e073c322a95dff510e89b commit 300d034b3c29972c7f9e073c322a95dff510e89b Author: Konstantin Belousov AuthorDate: 2024-11-04 22:10:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-13 18:06:28 +0000 device_pager: rename the un_pager.devp.dev field to handle (cherry picked from commit f0c07fe3d0007a4499f81583a99598cd0a74d45b) (cherry picked from commit c57dc755fa1a8bb0a4190f60df02b2bce5b8033c) Approved by: re (cperciva) --- 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; /*