linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* path_id / sun x4200 / mtp_sas
@ 2006-05-23 15:01 Sten Spans
  2006-05-26 11:00 ` Kay Sievers
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sten Spans @ 2006-05-23 15:01 UTC (permalink / raw)
  To: linux-hotplug


The new sas support added between 0.085 and 0.092
causes quite severe problems on sun x4200 servers with
mptsas sas controller. I'm seeing these problems
on debian testing / 0.092, with a query for "/block/sdb".

The handle_sas routine fails to return something useful
which leads to an infinite loop in the while loop starting
at line 379.

handle_sas gets called with 
"/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0/phy-0:1/rphy-0:1/target0:1:1/0:1:1:0"

which results in:
sas_host_path=/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0
sas_phy_path=phy-0:1/rphy-0:1
sas_phy_id=phy-0:1
sas_rphy_id=rphy-0:1
sas_phy_dev=/sys/class/sas_phy/phy-0:1
phy_address=0x50003ba0000003bb
sas_rphy_dev=/sys/class/sas_device/rphy-0:1

however the test at line 298 fails so $rphy_address remains
empty, and the while loop at line 379 restarts with the same input.

It looks like sas_rphy_dev shouldn't be
/sys/class/sas_device/rphy-0:1 but /sys/class/sas_rphy/rphy-0\:1.

Which leads to the following patch:
--- path_id     2006-05-24 01:54:45.000000000 +0200
+++ path_id.sten        2006-05-24 01:54:21.000000000 +0200
@@ -294,7 +294,7 @@
                 return
         fi
         sas_phy_address="$phy_address:$phy_port:$phy_id"
-       sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}"
+       sas_rphy_dev="/sys/class/sas_rphy/${sas_rphy_id}"
         if [ -e "$sas_rphy_dev/sas_address" ]; then
                 read rphy_address < $sas_rphy_dev/sas_address
                 read rphy_id < $sas_rphy_dev/phy_identifier

./path_id /block/sdb
ID_PATH=pci-0000:02:03.0-sas-0x50003ba0000003bb:1:1-0x500000e0117e8ad2:1


-- 
Sten Spans

"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: path_id / sun x4200 / mtp_sas
  2006-05-23 15:01 path_id / sun x4200 / mtp_sas Sten Spans
@ 2006-05-26 11:00 ` Kay Sievers
  2006-05-26 13:21 ` Sten Spans
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2006-05-26 11:00 UTC (permalink / raw)
  To: linux-hotplug

On Tue, 2006-05-23 at 17:01 +0200, Sten Spans wrote:
> The new sas support added between 0.085 and 0.092
> causes quite severe problems on sun x4200 servers with
> mptsas sas controller. I'm seeing these problems
> on debian testing / 0.092, with a query for "/block/sdb".
> 
> The handle_sas routine fails to return something useful
> which leads to an infinite loop in the while loop starting
> at line 379.
> 
> handle_sas gets called with 
> "/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0/phy-0:1/rphy-0:1/target0:1:1/0:1:1:0"
> 
> which results in:
> sas_host_path=/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0
> sas_phy_path=phy-0:1/rphy-0:1
> sas_phy_id=phy-0:1
> sas_rphy_id=rphy-0:1
> sas_phy_dev=/sys/class/sas_phy/phy-0:1
> phy_address=0x50003ba0000003bb
> sas_rphy_dev=/sys/class/sas_device/rphy-0:1
> 
> however the test at line 298 fails so $rphy_address remains
> empty, and the while loop at line 379 restarts with the same input.
> 
> It looks like sas_rphy_dev shouldn't be
> /sys/class/sas_device/rphy-0:1 but /sys/class/sas_rphy/rphy-0\:1.
> 
> Which leads to the following patch:
> --- path_id     2006-05-24 01:54:45.000000000 +0200
> +++ path_id.sten        2006-05-24 01:54:21.000000000 +0200
> @@ -294,7 +294,7 @@
>                  return
>          fi
>          sas_phy_address="$phy_address:$phy_port:$phy_id"
> -       sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}"
> +       sas_rphy_dev="/sys/class/sas_rphy/${sas_rphy_id}"

This is expected to be already fixed in udev 091:
  http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commitdiff;h±2a1fb1c6073c0679e80f515fe97cb21fa88e65


Thanks,
Kay



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x107521&bid$8729&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: path_id / sun x4200 / mtp_sas
  2006-05-23 15:01 path_id / sun x4200 / mtp_sas Sten Spans
  2006-05-26 11:00 ` Kay Sievers
@ 2006-05-26 13:21 ` Sten Spans
  2006-05-26 14:36 ` Kay Sievers
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sten Spans @ 2006-05-26 13:21 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 26 May 2006, Kay Sievers wrote:

> On Tue, 2006-05-23 at 17:01 +0200, Sten Spans wrote:
>> The new sas support added between 0.085 and 0.092
>> causes quite severe problems on sun x4200 servers with
>> mptsas sas controller. I'm seeing these problems
>> on debian testing / 0.092, with a query for "/block/sdb".
>>
>> The handle_sas routine fails to return something useful
>> which leads to an infinite loop in the while loop starting
>> at line 379.
>>
>> handle_sas gets called with
>> "/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0/phy-0:1/rphy-0:1/target0:1:1/0:1:1:0"
>>
>> which results in:
>> sas_host_path=/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0
>> sas_phy_path=phy-0:1/rphy-0:1
>> sas_phy_id=phy-0:1
>> sas_rphy_id=rphy-0:1
>> sas_phy_dev=/sys/class/sas_phy/phy-0:1
>> phy_address=0x50003ba0000003bb
>> sas_rphy_dev=/sys/class/sas_device/rphy-0:1
>>
>> however the test at line 298 fails so $rphy_address remains
>> empty, and the while loop at line 379 restarts with the same input.
>>
>> It looks like sas_rphy_dev shouldn't be
>> /sys/class/sas_device/rphy-0:1 but /sys/class/sas_rphy/rphy-0\:1.
>>
>> Which leads to the following patch:
>> --- path_id     2006-05-24 01:54:45.000000000 +0200
>> +++ path_id.sten        2006-05-24 01:54:21.000000000 +0200
>> @@ -294,7 +294,7 @@
>>                  return
>>          fi
>>          sas_phy_address="$phy_address:$phy_port:$phy_id"
>> -       sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}"
>> +       sas_rphy_dev="/sys/class/sas_rphy/${sas_rphy_id}"
>
> This is expected to be already fixed in udev 091:
>  http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commitdiff;h±2a1fb1c6073c0679e80f515fe97cb21fa88e65

I looked at 092 and it was broken there....

-- 
Sten Spans

"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x107521&bid$8729&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: path_id / sun x4200 / mtp_sas
  2006-05-23 15:01 path_id / sun x4200 / mtp_sas Sten Spans
  2006-05-26 11:00 ` Kay Sievers
  2006-05-26 13:21 ` Sten Spans
@ 2006-05-26 14:36 ` Kay Sievers
  2006-05-26 14:59 ` Sten Spans
  2006-05-26 15:11 ` Kay Sievers
  4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2006-05-26 14:36 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 2006-05-26 at 15:21 +0200, Sten Spans wrote:
> On Fri, 26 May 2006, Kay Sievers wrote:
> 
> > On Tue, 2006-05-23 at 17:01 +0200, Sten Spans wrote:
> >> The new sas support added between 0.085 and 0.092
> >> causes quite severe problems on sun x4200 servers with
> >> mptsas sas controller. I'm seeing these problems
> >> on debian testing / 0.092, with a query for "/block/sdb".
> >>
> >> The handle_sas routine fails to return something useful
> >> which leads to an infinite loop in the while loop starting
> >> at line 379.
> >>
> >> handle_sas gets called with
> >> "/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0/phy-0:1/rphy-0:1/target0:1:1/0:1:1:0"
> >>
> >> which results in:
> >> sas_host_path=/sys/devices/pci0000:00/0000:00:02.0/0000:02:03.0/host0
> >> sas_phy_path=phy-0:1/rphy-0:1
> >> sas_phy_id=phy-0:1
> >> sas_rphy_id=rphy-0:1
> >> sas_phy_dev=/sys/class/sas_phy/phy-0:1
> >> phy_address=0x50003ba0000003bb
> >> sas_rphy_dev=/sys/class/sas_device/rphy-0:1
> >>
> >> however the test at line 298 fails so $rphy_address remains
> >> empty, and the while loop at line 379 restarts with the same input.
> >>
> >> It looks like sas_rphy_dev shouldn't be
> >> /sys/class/sas_device/rphy-0:1 but /sys/class/sas_rphy/rphy-0\:1.
> >>
> >> Which leads to the following patch:
> >> --- path_id     2006-05-24 01:54:45.000000000 +0200
> >> +++ path_id.sten        2006-05-24 01:54:21.000000000 +0200
> >> @@ -294,7 +294,7 @@
> >>                  return
> >>          fi
> >>          sas_phy_address="$phy_address:$phy_port:$phy_id"
> >> -       sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}"
> >> +       sas_rphy_dev="/sys/class/sas_rphy/${sas_rphy_id}"
> >
> > This is expected to be already fixed in udev 091:
> >  http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commitdiff;h±2a1fb1c6073c0679e80f515fe97cb21fa88e65
> 
> I looked at 092 and it was broken there....

Ah ok. See this:
  http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h/8600dff2b140096a7df781884e918a16aa90e0

"sas_rphy" does not exist anymore.

Thanks,
Kay



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x107521&bid$8729&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: path_id / sun x4200 / mtp_sas
  2006-05-23 15:01 path_id / sun x4200 / mtp_sas Sten Spans
                   ` (2 preceding siblings ...)
  2006-05-26 14:36 ` Kay Sievers
@ 2006-05-26 14:59 ` Sten Spans
  2006-05-26 15:11 ` Kay Sievers
  4 siblings, 0 replies; 6+ messages in thread
From: Sten Spans @ 2006-05-26 14:59 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 26 May 2006, Kay Sievers wrote:

> On Fri, 2006-05-26 at 15:21 +0200, Sten Spans wrote:
>> On Fri, 26 May 2006, Kay Sievers wrote:
>>
>>>>          sas_phy_address="$phy_address:$phy_port:$phy_id"
>>>> -       sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}"
>>>> +       sas_rphy_dev="/sys/class/sas_rphy/${sas_rphy_id}"
>>>
>>> This is expected to be already fixed in udev 091:
>>>  http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commitdiff;h±2a1fb1c6073c0679e80f515fe97cb21fa88e65
>>
>> I looked at 092 and it was broken there....
>
> Ah ok. See this:
>  http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h/8600dff2b140096a7df781884e918a16aa90e0
>
> "sas_rphy" does not exist anymore.

Well that's nice and all, but quite a lot of people are going run 092+ with
2.6.16 and lower kernels. I had a quad opteron which took about 2 hours to
boot because of 4 path_id's looping and using all cpu's.
A version of handle_sas which doesn't loop on =< 2.6.16 would be very 
nice, it should be quite easy to fall-back to a reasonable default if
the 2.6.17+ directories don't exist.

-- 
Sten Spans

"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x107521&bid$8729&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: path_id / sun x4200 / mtp_sas
  2006-05-23 15:01 path_id / sun x4200 / mtp_sas Sten Spans
                   ` (3 preceding siblings ...)
  2006-05-26 14:59 ` Sten Spans
@ 2006-05-26 15:11 ` Kay Sievers
  4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2006-05-26 15:11 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 2006-05-26 at 16:59 +0200, Sten Spans wrote:
> On Fri, 26 May 2006, Kay Sievers wrote:
> 
> > On Fri, 2006-05-26 at 15:21 +0200, Sten Spans wrote:
> >> On Fri, 26 May 2006, Kay Sievers wrote:
> >>
> >>>>          sas_phy_address="$phy_address:$phy_port:$phy_id"
> >>>> -       sas_rphy_dev="/sys/class/sas_device/${sas_rphy_id}"
> >>>> +       sas_rphy_dev="/sys/class/sas_rphy/${sas_rphy_id}"
> >>>
> >>> This is expected to be already fixed in udev 091:
> >>>  http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commitdiff;h±2a1fb1c6073c0679e80f515fe97cb21fa88e65
> >>
> >> I looked at 092 and it was broken there....
> >
> > Ah ok. See this:
> >  http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h/8600dff2b140096a7df781884e918a16aa90e0
> >
> > "sas_rphy" does not exist anymore.
> 
> Well that's nice and all, but quite a lot of people are going run 092+ with
> 2.6.16 and lower kernels. I had a quad opteron which took about 2 hours to
> boot because of 4 path_id's looping and using all cpu's.
> A version of handle_sas which doesn't loop on =< 2.6.16 would be very 
> nice, it should be quite easy to fall-back to a reasonable default if
> the 2.6.17+ directories don't exist.

The change is already in 2.6.16. But sure, if you can send a patch that
works for you, and keeps the current code working, we can put it in.

Thanks,
Kay



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x107521&bid$8729&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2006-05-26 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-23 15:01 path_id / sun x4200 / mtp_sas Sten Spans
2006-05-26 11:00 ` Kay Sievers
2006-05-26 13:21 ` Sten Spans
2006-05-26 14:36 ` Kay Sievers
2006-05-26 14:59 ` Sten Spans
2006-05-26 15:11 ` Kay Sievers

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).