Thread (18 messages) 18 messages, 2 authors, 2008-07-24
STALE6599d

[PATCH 15/16 v4] ibmvfc: Add support for collaborative memory overcommit

From: Robert Jennings <hidden>
Date: 2008-07-23 18:35:59
Also in: linux-scsi

=46rom: Brian King [off-list ref]

Adds support to the ibmvfc driver for collaborative memory overcommit.

Signed-off-by: Brian King <redacted>
Signed-off-by: Robert Jennings <redacted>

---
We would like to take this patch through linuxppc-dev with the full
change set for this feature.  We are copying linux-scsi for review and ack.

---
 drivers/scsi/ibmvscsi/ibmvfc.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

Index: b/drivers/scsi/ibmvscsi/ibmvfc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -3819,6 +3819,20 @@ static int ibmvfc_remove(struct vio_dev=20
 	return 0;
 }
=20
+/**
+ * ibmvfc_get_desired_dma - Calculate DMA resources needed by the driver
+ * @vdev:	vio device struct
+ *
+ * Return value:
+ *	Number of bytes the driver will need to DMA map at the same time in
+ *	order to perform well.
+ */
+static unsigned long ibmvfc_get_desired_dma(struct vio_dev *vdev)
+{
+	unsigned long pool_dma =3D max_requests * sizeof(union ibmvfc_iu);
+	return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun);
+}
+
 static struct vio_device_id ibmvfc_device_table[] __devinitdata =3D {
 	{"fcp", "IBM,vfc-client"},
 	{ "", "" }
@@ -3829,6 +3843,7 @@ static struct vio_driver ibmvfc_driver =3D
 	.id_table =3D ibmvfc_device_table,
 	.probe =3D ibmvfc_probe,
 	.remove =3D ibmvfc_remove,
+	.get_desired_dma =3D ibmvfc_get_desired_dma,
 	.driver =3D {
 		.name =3D IBMVFC_NAME,
 		.owner =3D THIS_MODULE,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help