Store a reference to the CPU that submitted the I/O request with the

request itself.
This commit is contained in:
jmcneill 2019-06-28 14:56:45 +00:00
parent 4c793a8fd3
commit 5c5c42d67e
2 changed files with 5 additions and 3 deletions

View File

@ -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 @@ dk_start(struct dk_softc *dksc, struct buf *bp)
mutex_enter(&dksc->sc_iolock);
if (bp != NULL) {
bp->b_ci = curcpu();
disk_wait(&dksc->sc_dkdev);
bufq_put(dksc->sc_bufq, bp);
}

View File

@ -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 @@ struct buf {
(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.