mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-24 03:37:16 +00:00
Microoptimize cam_num_doneqs math in xpt_done().
MFC after: 1 week
This commit is contained in:
parent
dae0ba753c
commit
466d0a2572
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367862
|
@ -178,7 +178,7 @@ struct cam_doneq {
|
|||
};
|
||||
|
||||
static struct cam_doneq cam_doneqs[MAXCPU];
|
||||
static int cam_num_doneqs;
|
||||
static u_int __read_mostly cam_num_doneqs;
|
||||
static struct proc *cam_proc;
|
||||
|
||||
SYSCTL_INT(_kern_cam, OID_AUTO, num_doneqs, CTLFLAG_RDTUN,
|
||||
|
@ -4620,7 +4620,7 @@ xpt_done(union ccb *done_ccb)
|
|||
|
||||
/* Store the time the ccb was in the sim */
|
||||
done_ccb->ccb_h.qos.periph_data = cam_iosched_delta_t(done_ccb->ccb_h.qos.periph_data);
|
||||
hash = (done_ccb->ccb_h.path_id + done_ccb->ccb_h.target_id +
|
||||
hash = (u_int)(done_ccb->ccb_h.path_id + done_ccb->ccb_h.target_id +
|
||||
done_ccb->ccb_h.target_lun) % cam_num_doneqs;
|
||||
queue = &cam_doneqs[hash];
|
||||
mtx_lock(&queue->cam_doneq_mtx);
|
||||
|
|
Loading…
Reference in a new issue