linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.11-ck6
@ 2005-04-30 14:17 Con Kolivas
  2005-04-30 20:13 ` [ck] 2.6.11-ck6 Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Con Kolivas @ 2005-04-30 14:17 UTC (permalink / raw)
  To: ck, linux kernel mailing list

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

These are patches designed to improve system responsiveness. It is 
configurable to any workload but the default ck* patch is aimed at the 
desktop and ck*-server is available with more emphasis on serverspace.

Apply to 2.6.11 (already contains latest 4 point stable release):
http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck6/patch-2.6.11-ck6.bz2
or
http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck6/patch-2.6.11-ck6-server.bz2

web:
http://kernel.kolivas.org
all patches:
http://ck.kolivas.org/patches/
Split patches available.


Changes since 2.6.11-ck4 (last public announcement):
Added:
+2.6.11-ck4_to_staircase11.diff
Update to new version of staircase announced on mailing list
+s11_s11.1.diff
New staircase specific scalability improvements

+scsi-dead-device.diff
A fix for a scsi related hang that seems to hit many -ck users

+patch-2.6.11.8
Latest stable tree

+2611ck6-version.diff
Reinstate the Australian animal that's woozy from cognac


Removed:
-patch-2.6.11.7
-2611ck4-version.diff


And don't forget to pour one of these before booting this kernel:
http://ck.kolivas.org/patches/2.6/2.6.11/cognac.JPG


Cheers,
Con

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ck] 2.6.11-ck6
  2005-04-30 14:17 2.6.11-ck6 Con Kolivas
@ 2005-04-30 20:13 ` Jens Axboe
  2005-05-01  0:14   ` Con Kolivas
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2005-04-30 20:13 UTC (permalink / raw)
  To: Con Kolivas; +Cc: ck, linux kernel mailing list

On Sun, May 01 2005, Con Kolivas wrote:
> +scsi-dead-device.diff
> A fix for a scsi related hang that seems to hit many -ck users

This looks strange, like a fix and a half. You should just apply the
patch I sent you originally, weeks ago, changing sdev->sdev_lock to
&q->__queue_lock.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ck] 2.6.11-ck6
  2005-04-30 20:13 ` [ck] 2.6.11-ck6 Jens Axboe
@ 2005-05-01  0:14   ` Con Kolivas
  2005-05-01  0:33     ` Con Kolivas
  0 siblings, 1 reply; 6+ messages in thread
From: Con Kolivas @ 2005-05-01  0:14 UTC (permalink / raw)
  To: Jens Axboe; +Cc: ck, linux kernel mailing list


[-- Attachment #1.1: Type: text/plain, Size: 569 bytes --]

On Sun, 1 May 2005 06:13, Jens Axboe wrote:
> On Sun, May 01 2005, Con Kolivas wrote:
> > +scsi-dead-device.diff
> > A fix for a scsi related hang that seems to hit many -ck users
>
> This looks strange, like a fix and a half. You should just apply the
> patch I sent you originally, weeks ago, changing sdev->sdev_lock to
> &q->__queue_lock.

rarrgh

Thanks for keeping an eye out on for this. Unfortunately you sent more than 
one patch at different times and it looks like I included the wrong one then? 
This is the patch I (tried to) include.

Con

[-- Attachment #1.2: scsi-dead-device --]
[-- Type: text/x-diff, Size: 2035 bytes --]

===== drivers/scsi/scsi_lib.c 1.151 vs edited =====
--- 1.151/drivers/scsi/scsi_lib.c	2005-02-17 20:17:22 +01:00
+++ edited/drivers/scsi/scsi_lib.c	2005-03-18 12:33:09 +01:00
@@ -1233,6 +1233,22 @@ static inline int scsi_host_queue_ready(
 }
 
 /*
+ * Kill requests for a dead device
+ */
+static void scsi_kill_requests(request_queue_t *q)
+{
+	struct request *req;
+
+	while ((req = elv_next_request(q)) != NULL) {
+		blkdev_dequeue_request(req);
+		req->flags |= REQ_QUIET;
+		while (end_that_request_first(req, 0, req->nr_sectors))
+			;
+		end_that_request_last(req);
+	}
+}
+
+/*
  * Function:    scsi_request_fn()
  *
  * Purpose:     Main strategy routine for SCSI.
@@ -1246,10 +1262,16 @@ static inline int scsi_host_queue_ready(
 static void scsi_request_fn(struct request_queue *q)
 {
 	struct scsi_device *sdev = q->queuedata;
-	struct Scsi_Host *shost = sdev->host;
+	struct Scsi_Host *shost;
 	struct scsi_cmnd *cmd;
 	struct request *req;
 
+	if (!sdev) {
+		printk("scsi: killing requests for dead queue\n");
+		scsi_kill_requests(q);
+		return;
+	}
+
 	if(!get_device(&sdev->sdev_gendev))
 		/* We must be tearing the block queue down already */
 		return;
@@ -1258,6 +1280,7 @@ static void scsi_request_fn(struct reque
 	 * To start with, we keep looping until the queue is empty, or until
 	 * the host is no longer able to accept any more requests.
 	 */
+	shost = sdev->host;
 	while (!blk_queue_plugged(q)) {
 		int rtn;
 		/*
===== drivers/scsi/scsi_sysfs.c 1.69 vs edited =====
--- 1.69/drivers/scsi/scsi_sysfs.c	2005-02-17 02:05:37 +01:00
+++ edited/drivers/scsi/scsi_sysfs.c	2005-03-18 12:32:57 +01:00
@@ -168,8 +168,10 @@ void scsi_device_dev_release(struct devi
 	list_del(&sdev->starved_entry);
 	spin_unlock_irqrestore(sdev->host->host_lock, flags);
 
-	if (sdev->request_queue)
+	if (sdev->request_queue) {
+		sdev->request_queue->queuedata = NULL;
 		scsi_free_queue(sdev->request_queue);
+	}
 
 	scsi_target_reap(scsi_target(sdev));
 

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ck] 2.6.11-ck6
  2005-05-01  0:14   ` Con Kolivas
@ 2005-05-01  0:33     ` Con Kolivas
  2005-05-01  1:31       ` 2.6.11-ck7 Con Kolivas
  2005-05-01 11:42       ` [ck] 2.6.11-ck6 Jens Axboe
  0 siblings, 2 replies; 6+ messages in thread
From: Con Kolivas @ 2005-05-01  0:33 UTC (permalink / raw)
  To: ck; +Cc: Jens Axboe, linux kernel mailing list


[-- Attachment #1.1: Type: text/plain, Size: 819 bytes --]

On Sun, 1 May 2005 10:14, Con Kolivas wrote:
> On Sun, 1 May 2005 06:13, Jens Axboe wrote:
> > On Sun, May 01 2005, Con Kolivas wrote:
> > > +scsi-dead-device.diff
> > > A fix for a scsi related hang that seems to hit many -ck users
> >
> > This looks strange, like a fix and a half. You should just apply the
> > patch I sent you originally, weeks ago, changing sdev->sdev_lock to
> > &q->__queue_lock.
>
> rarrgh
>
> Thanks for keeping an eye out on for this. Unfortunately you sent more than
> one patch at different times and it looks like I included the wrong one
> then? This is the patch I (tried to) include.

I guess from your description this was the one I should have included... Looks 
like a ck7 should come out instead since that other patch was more likely 
harmful than not :\

Con

[-- Attachment #1.2: 2.6.11-ck-scsifix.diff --]
[-- Type: text/x-diff, Size: 3058 bytes --]

===== drivers/block/ll_rw_blk.c 1.288 vs edited =====
--- 1.288/drivers/block/ll_rw_blk.c	2005-03-31 12:47:54 +02:00
+++ edited/drivers/block/ll_rw_blk.c	2005-04-07 08:38:01 +02:00
@@ -1714,6 +1711,15 @@ request_queue_t *blk_init_queue(request_
 	if (blk_init_free_list(q))
 		goto out_init;
 
+	/*
+	 * if caller didn't supply a lock, they get per-queue locking with
+	 * our embedded lock
+	 */
+	if (!lock) {
+		spin_lock_init(&q->__queue_lock);
+		lock = &q->__queue_lock;
+	}
+
 	q->request_fn		= rfn;
 	q->back_merge_fn       	= ll_back_merge_fn;
 	q->front_merge_fn      	= ll_front_merge_fn;
===== drivers/scsi/scsi_lib.c 1.153 vs edited =====
--- 1.153/drivers/scsi/scsi_lib.c	2005-03-30 21:49:45 +02:00
+++ edited/drivers/scsi/scsi_lib.c	2005-04-07 08:42:30 +02:00
@@ -360,9 +360,9 @@ void scsi_device_unbusy(struct scsi_devi
 		     shost->host_failed))
 		scsi_eh_wakeup(shost);
 	spin_unlock(shost->host_lock);
-	spin_lock(&sdev->sdev_lock);
+	spin_lock(sdev->request_queue->queue_lock);
 	sdev->device_busy--;
-	spin_unlock_irqrestore(&sdev->sdev_lock, flags);
+	spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
 }
 
 /*
@@ -1425,7 +1425,7 @@ struct request_queue *scsi_alloc_queue(s
 	struct Scsi_Host *shost = sdev->host;
 	struct request_queue *q;
 
-	q = blk_init_queue(scsi_request_fn, &sdev->sdev_lock);
+	q = blk_init_queue(scsi_request_fn, NULL);
 	if (!q)
 		return NULL;
 
===== drivers/scsi/scsi_scan.c 1.143 vs edited =====
--- 1.143/drivers/scsi/scsi_scan.c	2005-03-23 22:58:13 +01:00
+++ edited/drivers/scsi/scsi_scan.c	2005-04-07 08:40:53 +02:00
@@ -249,7 +249,6 @@ static struct scsi_device *scsi_alloc_sd
 	 */
 	sdev->borken = 1;
 
-	spin_lock_init(&sdev->sdev_lock);
 	sdev->request_queue = scsi_alloc_queue(sdev);
 	if (!sdev->request_queue) {
 		/* release fn is set up in scsi_sysfs_device_initialise, so
===== include/linux/blkdev.h 1.162 vs edited =====
--- 1.162/include/linux/blkdev.h	2005-03-29 03:42:37 +02:00
+++ edited/include/linux/blkdev.h	2005-04-07 08:36:06 +02:00
@@ -355,8 +364,11 @@ struct request_queue
 	unsigned long		queue_flags;
 
 	/*
-	 * protects queue structures from reentrancy
+	 * protects queue structures from reentrancy. ->__queue_lock should
+	 * _never_ be used directly, it is queue private. always use
+	 * ->queue_lock.
 	 */
+	spinlock_t		__queue_lock;
 	spinlock_t		*queue_lock;
 
 	/*
===== include/scsi/scsi_device.h 1.33 vs edited =====
--- 1.33/include/scsi/scsi_device.h	2005-03-23 22:58:05 +01:00
+++ edited/include/scsi/scsi_device.h	2005-04-07 08:41:09 +02:00
@@ -44,7 +44,6 @@ struct scsi_device {
 	struct list_head    same_target_siblings; /* just the devices sharing same target id */
 
 	volatile unsigned short device_busy;	/* commands actually active on low-level */
-	spinlock_t sdev_lock;           /* also the request queue_lock */
 	spinlock_t list_lock;
 	struct list_head cmd_list;	/* queue of in use SCSI Command structures */
 	struct list_head starved_entry;




[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 2.6.11-ck7
  2005-05-01  0:33     ` Con Kolivas
@ 2005-05-01  1:31       ` Con Kolivas
  2005-05-01 11:42       ` [ck] 2.6.11-ck6 Jens Axboe
  1 sibling, 0 replies; 6+ messages in thread
From: Con Kolivas @ 2005-05-01  1:31 UTC (permalink / raw)
  To: ck; +Cc: linux kernel mailing list

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

Small update from ck6 for wrong scsi patch merge

http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck7/patch-2.6.11-ck7.bz2
or
http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck7/patch-2.6.11-ck7-server.bz2

Changes since 2.6.11-ck6:
-scsi-dead-device.diff
+2.6.11-ck-scsifix.diff
Apply the _correct_ scsci fix.

-2611ck6-version.diff
+2611ck7-version.diff

Cheers,
Con

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ck] 2.6.11-ck6
  2005-05-01  0:33     ` Con Kolivas
  2005-05-01  1:31       ` 2.6.11-ck7 Con Kolivas
@ 2005-05-01 11:42       ` Jens Axboe
  1 sibling, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2005-05-01 11:42 UTC (permalink / raw)
  To: Con Kolivas; +Cc: ck, linux kernel mailing list

On Sun, May 01 2005, Con Kolivas wrote:
> On Sun, 1 May 2005 10:14, Con Kolivas wrote:
> > On Sun, 1 May 2005 06:13, Jens Axboe wrote:
> > > On Sun, May 01 2005, Con Kolivas wrote:
> > > > +scsi-dead-device.diff
> > > > A fix for a scsi related hang that seems to hit many -ck users
> > >
> > > This looks strange, like a fix and a half. You should just apply the
> > > patch I sent you originally, weeks ago, changing sdev->sdev_lock to
> > > &q->__queue_lock.
> >
> > rarrgh
> >
> > Thanks for keeping an eye out on for this. Unfortunately you sent more than
> > one patch at different times and it looks like I included the wrong one
> > then? This is the patch I (tried to) include.
> 
> I guess from your description this was the one I should have
> included... Looks like a ck7 should come out instead since that other
> patch was more likely harmful than not :\

Yep, that is the correct patch. The other one wont do any further harm,
it just wont fix the problem fully.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-01 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-30 14:17 2.6.11-ck6 Con Kolivas
2005-04-30 20:13 ` [ck] 2.6.11-ck6 Jens Axboe
2005-05-01  0:14   ` Con Kolivas
2005-05-01  0:33     ` Con Kolivas
2005-05-01  1:31       ` 2.6.11-ck7 Con Kolivas
2005-05-01 11:42       ` [ck] 2.6.11-ck6 Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).