* RE: fibre channel sync cache question
@ 2006-07-25 22:28 Moore, Eric
2006-07-25 22:39 ` Arjan van de Ven
0 siblings, 1 reply; 8+ messages in thread
From: Moore, Eric @ 2006-07-25 22:28 UTC (permalink / raw)
To: Michael Reed, linux-scsi; +Cc: James Smart, dougg
-- Tuesday, July 25, 2006 4:22 PM, Michael Reed wrote:
> Using fibre channel disks, I've noticed that when the system
> shuts down
> that the sd_driver issues a sync cache command to the device.
> I've also
> noticed that when the lldd is removed via rmmod that this
> sync cache is
> not executed. I would think that the sync cache would be desirable
> under this circumstance.
>
This is not handled from sg path as well. Meaning if you
use sdparm, and enable the caching page WCE bit, then reboot,
there is no SYNC cache issued from above.
We handle this in fusion drivers due to short coming from above.
Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: fibre channel sync cache question
2006-07-25 22:28 fibre channel sync cache question Moore, Eric
@ 2006-07-25 22:39 ` Arjan van de Ven
2006-07-26 3:51 ` Douglas Gilbert
0 siblings, 1 reply; 8+ messages in thread
From: Arjan van de Ven @ 2006-07-25 22:39 UTC (permalink / raw)
To: Moore, Eric; +Cc: dougg, James Smart, linux-scsi, Michael Reed
On Tue, 2006-07-25 at 16:28 -0600, Moore, Eric wrote:
> -- Tuesday, July 25, 2006 4:22 PM, Michael Reed wrote:
>
> > Using fibre channel disks, I've noticed that when the system
> > shuts down
> > that the sd_driver issues a sync cache command to the device.
> > I've also
> > noticed that when the lldd is removed via rmmod that this
> > sync cache is
> > not executed. I would think that the sync cache would be desirable
> > under this circumstance.
> >
>
> This is not handled from sg path as well. Meaning if you
> use sdparm, and enable the caching page WCE bit, then reboot,
> there is no SYNC cache issued from above.
>
> We handle this in fusion drivers due to short coming from above.
Hi,
that sounds sooo like the wrong approach... wouldn't it be better to fix
sg instead?
Greetings,
Arjan van de Ven
--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: fibre channel sync cache question
2006-07-25 22:39 ` Arjan van de Ven
@ 2006-07-26 3:51 ` Douglas Gilbert
2006-07-26 18:20 ` Michael Reed
0 siblings, 1 reply; 8+ messages in thread
From: Douglas Gilbert @ 2006-07-26 3:51 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Moore, Eric, James Smart, linux-scsi, Michael Reed
Arjan van de Ven wrote:
> On Tue, 2006-07-25 at 16:28 -0600, Moore, Eric wrote:
>> -- Tuesday, July 25, 2006 4:22 PM, Michael Reed wrote:
>>
>>> Using fibre channel disks, I've noticed that when the system
>>> shuts down
>>> that the sd_driver issues a sync cache command to the device.
>>> I've also
>>> noticed that when the lldd is removed via rmmod that this
>>> sync cache is
>>> not executed. I would think that the sync cache would be desirable
>>> under this circumstance.
>>>
>> This is not handled from sg path as well. Meaning if you
>> use sdparm, and enable the caching page WCE bit, then reboot,
>> there is no SYNC cache issued from above.
>>
>> We handle this in fusion drivers due to short coming from above.
>
>
> Hi,
>
> that sounds sooo like the wrong approach... wouldn't it be better to fix
> sg instead?
Uh? sg is just a pass through. As such it can subvert
policy decisions of the kernel. That isn't always a
bad thing :-)
The design flaw is any driver that tries to maintain a
state variable associated with a device (logical unit)
and can't cope with situations when it gets out of sync.
If you managed to neuter the pass through, how would you
cope with another initiator?
Doug Gilbert
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fibre channel sync cache question
2006-07-26 3:51 ` Douglas Gilbert
@ 2006-07-26 18:20 ` Michael Reed
2006-07-26 18:40 ` Michael Reed
2006-07-26 20:22 ` Stefan Richter
0 siblings, 2 replies; 8+ messages in thread
From: Michael Reed @ 2006-07-26 18:20 UTC (permalink / raw)
To: dougg; +Cc: Arjan van de Ven, Moore, Eric, James Smart, linux-scsi
Douglas Gilbert wrote:
> Arjan van de Ven wrote:
>> On Tue, 2006-07-25 at 16:28 -0600, Moore, Eric wrote:
>>> -- Tuesday, July 25, 2006 4:22 PM, Michael Reed wrote:
>>>> Using fibre channel disks, I've noticed that when the system shuts down
>>>> that the sd_driver issues a sync cache command to the device. I've
>>>> also
>>>> noticed that when the lldd is removed via rmmod that this sync cache is
>>>> not executed. I would think that the sync cache would be desirable
>>>> under this circumstance.
>>>>
>>> This is not handled from sg path as well. Meaning if you
>>> use sdparm, and enable the caching page WCE bit, then reboot,
>>> there is no SYNC cache issued from above.
>>> We handle this in fusion drivers due to short coming from above.
>>
>>
>> Hi,
>>
>> that sounds sooo like the wrong approach... wouldn't it be better to fix
>> sg instead?
>
> Uh? sg is just a pass through. As such it can subvert
> policy decisions of the kernel. That isn't always a
> bad thing :-)
>
> The design flaw is any driver that tries to maintain a
> state variable associated with a device (logical unit)
> and can't cope with situations when it gets out of sync.
> If you managed to neuter the pass through, how would you
> cope with another initiator?
Perhaps the best policy for sd is to assume that WCE is enabled
and just issue the sync cache.
--
I'm wondering about the policy of issuing a sync cache. There
are target removal paths which result in it not being issued.
So, the real question is: when a scsi target is removed, is it
policy that sync cache will be issued?
In fibre channel, here are two code paths in which sync cache
is not issued.
- removal of LLDD (rmmod)
- removal of target via sysfs device/delete
In a closer look at the target removal via sysfs device/delete,
I observe that portions of the sysfs fc_remote_ports/rport-*
remain in place.
Do we need to tie the device/delete to the transport?
Can of worms? Close eyes, run screaming?
Mike
>
> Doug Gilbert
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fibre channel sync cache question
2006-07-26 18:20 ` Michael Reed
@ 2006-07-26 18:40 ` Michael Reed
2006-07-26 20:22 ` Stefan Richter
1 sibling, 0 replies; 8+ messages in thread
From: Michael Reed @ 2006-07-26 18:40 UTC (permalink / raw)
To: Michael Reed
Cc: dougg, Arjan van de Ven, Moore, Eric, James Smart, linux-scsi
Michael Reed wrote:
>
> In a closer look at the target removal via sysfs device/delete,
> I observe that portions of the sysfs fc_remote_ports/rport-*
> remain in place.
>
Doh. What a stupid observation I made. It's working as intended.
It keeps the bindings around.
Mike
> Do we need to tie the device/delete to the transport?
>
> Can of worms? Close eyes, run screaming?
>
> Mike
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: fibre channel sync cache question
2006-07-26 18:20 ` Michael Reed
2006-07-26 18:40 ` Michael Reed
@ 2006-07-26 20:22 ` Stefan Richter
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Richter @ 2006-07-26 20:22 UTC (permalink / raw)
To: Michael Reed
Cc: dougg, Arjan van de Ven, Moore, Eric, James Smart, linux-scsi
Michael Reed wrote:
>>>>-- Tuesday, July 25, 2006 4:22 PM, Michael Reed wrote:
>>>>>Using fibre channel disks, I've noticed that when the system shuts down
>>>>>that the sd_driver issues a sync cache command to the device. I've
>>>>>also
>>>>>noticed that when the lldd is removed via rmmod that this sync cache is
>>>>>not executed. I would think that the sync cache would be desirable
>>>>>under this circumstance.
[...]
> I'm wondering about the policy of issuing a sync cache. There
> are target removal paths which result in it not being issued.
>
> So, the real question is: when a scsi target is removed, is it
> policy that sync cache will be issued?
>
> In fibre channel, here are two code paths in which sync cache
> is not issued.
>
> - removal of LLDD (rmmod)
> - removal of target via sysfs device/delete
[...]
This problem exists with all transports which use scsi_remove_device or
scsi_remove_host for soft device removal, as noted by Mike Christie in
"question about sd_sync_cache and shutdown" on 2006-07-12. He pointed
out that devices are brought into SDEV_CANCEL state before sd_shutdown
is entered. Therefore sd_shutdown does not sync the cache.
This behavior changed a few Linux releases ago. I cannot pinpoint the
responsible changeset. So, to answer your question about policy, there
is no fixed policy in the specification and implementation of the
mid-low SCSI API. Generally, neither "soft shutdown" nor "hot unplug"
can be explicitly signaled from LLD to the SCSI core.
Unless somebody comes up with a general solution for SCSI core, I am
planning to look for a particular solution in the sbp2 transport driver.
(When an sbp2 LU is to be taken down, check if it is still physically
present and somehow trigger SCSI high-level shutdown methods before
scsi_remove_device.)
--
Stefan Richter
-=====-=-==- -=== ==-=-
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: fibre channel sync cache question
@ 2006-07-25 22:51 Moore, Eric
0 siblings, 0 replies; 8+ messages in thread
From: Moore, Eric @ 2006-07-25 22:51 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: dougg, James Smart, linux-scsi, Michael Reed
-- Tuesday, July 25, 2006 4:40 PM, Arjan van de Ven
>
> Hi,
>
> that sounds sooo like the wrong approach... wouldn't it be
> better to fix
> sg instead?
>
>
Agreed. We want to remove our sync cache code when its fully handled
from all cases above.
^ permalink raw reply [flat|nested] 8+ messages in thread
* fibre channel sync cache question
@ 2006-07-25 22:22 Michael Reed
0 siblings, 0 replies; 8+ messages in thread
From: Michael Reed @ 2006-07-25 22:22 UTC (permalink / raw)
To: linux-scsi; +Cc: James Smart, Moore, Eric Dean, Michael Reed
Hello All,
Using fibre channel disks, I've noticed that when the system shuts down
that the sd_driver issues a sync cache command to the device. I've also
noticed that when the lldd is removed via rmmod that this sync cache is
not executed. I would think that the sync cache would be desirable
under this circumstance.
Was it a conscious decision to not have sync cache executed during
module unload?
Is it desirable?
(There are various reasons why it doesn't work. The rport port_state
is not ONLINE, the module is being unloaded so that a reference cannot
be acquired, the sdev state is SDEV_CANCEL. Three strikes and you're
out?)
Mike
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-07-26 20:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 22:28 fibre channel sync cache question Moore, Eric
2006-07-25 22:39 ` Arjan van de Ven
2006-07-26 3:51 ` Douglas Gilbert
2006-07-26 18:20 ` Michael Reed
2006-07-26 18:40 ` Michael Reed
2006-07-26 20:22 ` Stefan Richter
-- strict thread matches above, loose matches on Subject: below --
2006-07-25 22:51 Moore, Eric
2006-07-25 22:22 Michael Reed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox