Skip to contentSkip to conversation

BUG in sas event handling mechanism???

DISCUSSION [email protected] 3 participants 4 messages Sep 22, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

I see a PORTE_BYTES_DMAED event, followed by a PHYE_LOSS_OF_SIGNAL event and then followed by a PORTE_BYTES_DMAED event on the same phy. The code seems to just drop the last event because of the not yet processed first event. So, it just processes the first two events in that order. In other words, the link doesn't get used at all!

Of course, I get timeouts because of Vitesse/AIC94xx combination while doing discovery. :-(

Maybe, this is what Luben is talking about when he said, "Priority Queue Without Duplication Implementation"?

Thanks, Malahal.

#1 lore raw
Quoted 5 lines · On Fri, 2006-09-22 at 10:40 -0700, [email protected] wrote:

I see a PORTE_BYTES_DMAED event, followed by a PHYE_LOSS_OF_SIGNAL event and then followed by a PORTE_BYTES_DMAED event on the same phy. The code seems to just drop the last event because of the not yet processed first event. So, it just processes the first two events in that order. In other words, the link doesn't get used at all!

I am seeing a very similar issue with hot-plugging on the x260 systems with the internal expanders. If a disk is pulled and plugged back in right away then the PORTE_BROADCAST_RCVD event that was triggered when the disk is plugged back in is dropped, causing the disk to never be rediscovered. If there is enough of a delay between unplugging and plugging then both PORTE_BROADCAST_RCVD events are processed correctly.

Any ideas on what would cause these events to be dropped?

--Alexis

Quoted 4 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 6 lines · Alexis Bruemmer [[email protected]] wrote:
Quoted 5 lines · On Fri, 2006-09-22 at 10:40 -0700, [email protected] wrote:

I see a PORTE_BYTES_DMAED event, followed by a PHYE_LOSS_OF_SIGNAL event and then followed by a PORTE_BYTES_DMAED event on the same phy. The code seems to just drop the last event because of the not yet processed first event. So, it just processes the first two events in that order. In other words, the link doesn't get used at all!

Quoted 8 lines

I am seeing a very similar issue with hot-plugging on the x260 systems with the internal expanders. If a disk is pulled and plugged back in right away then the PORTE_BROADCAST_RCVD event that was triggered when the disk is plugged back in is dropped, causing the disk to never be rediscovered. If there is enough of a delay between unplugging and plugging then both PORTE_BROADCAST_RCVD events are processed correctly.

Any ideas on what would cause these events to be dropped?

The code in sas_queue_event() drops an event if there is one already in the work queue. I don't know enough about PORTE_BROADCAST_RCVD event to say if that is OK to to drop the event if one is pending already...

Thanks, Malahal.

#3 lore raw
In reply to [email protected]
Quoted 5 lines · --- [email protected] wrote:

I see a PORTE_BYTES_DMAED event, followed by a PHYE_LOSS_OF_SIGNAL event and then followed by a PORTE_BYTES_DMAED event on the same phy. The code seems to just drop the last event because of the not yet processed first event. So, it just processes the first two events in that order. In other words, the link doesn't get used at all!

Hi Malahal,

This is of course wrong and the original SAS Stack as written by me doesn't process this in the way you outlined above, and doesn't lose *any* events. In the above example, the device is _properly discovered_.

You should hold Bottomley and LTC directly responsible for this. Not "someone" or "the community".

Here are their patches directy responsible for this:
Bottomley: http://marc.theaimsgroup.com/?l=linux-scsi&m=114218113500117&w=2
Bruemmer: http://marc.theaimsgroup.com/?l=linux-scsi&m=114235935625301&w=2
Bruemmer: http://marc.theaimsgroup.com/?l=linux-scsi&m=114721079722569&w=2

Quoted 2 lines

Of course, I get timeouts because of Vitesse/AIC94xx combination while doing discovery. :-(

Don't blame the hardware. Software should be robust enough to handle the worst cases, in fact any case.

Quoted 2 lines

Maybe, this is what Luben is talking about when he said, "Priority Queue Without Duplication Implementation"?

Yes.

Good luck Malahal!
Luben