Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Store a reference to the CPU that submitted the I/O requ...



details:   https://anonhg.NetBSD.org/src/rev/c9df81eaaf51
branches:  trunk
changeset: 452335:c9df81eaaf51
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Jun 28 14:56:45 2019 +0000

description:
Store a reference to the CPU that submitted the I/O request with the
request itself.

diffstat:

 sys/dev/dksubr.c |  5 +++--
 sys/sys/buf.h    |  3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r cecaf108674b -r c9df81eaaf51 sys/dev/dksubr.c
--- a/sys/dev/dksubr.c  Fri Jun 28 10:47:12 2019 +0000
+++ b/sys/dev/dksubr.c  Fri Jun 28 14:56:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.108 2019/04/21 11:45:08 maya Exp $ */
+/* $NetBSD: dksubr.c,v 1.109 2019/06/28 14:56:46 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.108 2019/04/21 11:45:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.109 2019/06/28 14:56:46 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -381,6 +381,7 @@
        mutex_enter(&dksc->sc_iolock);
 
        if (bp != NULL) {
+               bp->b_ci = curcpu();
                disk_wait(&dksc->sc_dkdev);
                bufq_put(dksc->sc_bufq, bp);
        }
diff -r cecaf108674b -r c9df81eaaf51 sys/sys/buf.h
--- a/sys/sys/buf.h     Fri Jun 28 10:47:12 2019 +0000
+++ b/sys/sys/buf.h     Fri Jun 28 14:56:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.129 2017/06/08 01:23:01 chs Exp $ */
+/*     $NetBSD: buf.h,v 1.130 2019/06/28 14:56:45 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -137,6 +137,7 @@
                                                      (volume relative) */
        struct proc             *b_proc;        /* b: proc if BB_PHYS */
        void                    *b_saveaddr;    /* b: saved b_data for physio */
+       struct cpu_info         *b_ci;          /* b: originating CPU */
 
        /*
         * b: private data for owner.



Home | Main Index | Thread Index | Old Index