Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecc3bc98 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Christoph Hellwig
Browse files

fusion: Add free msg frames to the head, not tail of list



Reusing a msg frame quickly means it's still cache-hot.  This yields
a small but noticable performance improvement in a well-known database
benchmark.  This improvement is already present in the mpt3sas driver.

Signed-off-by: default avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
Reviewed-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
Reviewed-by: default avatarPraveen Krishnamoorthy <Praveen.krishnamoorthy@lsi.com>
Acked-by: default avatarSreekanth Reddy <Sreekanth.reddy@lsi.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 049b3e81
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1037,7 +1037,7 @@ mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
		goto out;
	/* signature to know if this mf is freed */
	mf->u.frame.linkage.arg1 = cpu_to_le32(0xdeadbeaf);
	list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeQ);
	list_add(&mf->u.frame.linkage.list, &ioc->FreeQ);
#ifdef MFCNT
	ioc->mfcnt--;
#endif