linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hdparm write cache settings
@ 2004-10-15 19:48 Doug Maxey
  2004-10-19 21:47 ` Mark Lord
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Maxey @ 2004-10-15 19:48 UTC (permalink / raw)
  To: Mark Lord; +Cc: Linux IDE Mailing List


Mark,

I have been tweaking the idedisk_setup() and write_cache() to handle
drives with write cache disabled by default and the barrier settings on
changes between WC enabled and disabled.

Bart has pointed out in offline mail, and testing has confirmed, that 
HDIO_DRIVE_CMD is used, which bypasses the settings parameter lookup 
in generic_ide_ioctl() of the drive settings enabled in ide_add_settings().  

Is it reasonable that a change could be made to enable the use of
HDIO_SET_WCACHE in hdparm?

Or should I be looking to intercept the call and do The Right Thing
(TM:) in the ide driver?


++doug





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

* Re: hdparm write cache settings
  2004-10-15 19:48 hdparm write cache settings Doug Maxey
@ 2004-10-19 21:47 ` Mark Lord
  2004-10-21 16:54   ` Doug Maxey
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Lord @ 2004-10-19 21:47 UTC (permalink / raw)
  To: Doug Maxey; +Cc: Linux IDE Mailing List

Hi,

Sure, I can update hdparm to first attempt HDIO_SET_WCACHE.
If that call is nak'd (usually due to lack of kernel support for it),
then hdparm will use HDIO_DRIVE_CMD as a fallback.

This is a VERY popular setting among end-users of Linux.

Cheers
-- 
Mark Lord
Real-Time Remedies Inc.
mlord@pobox.com

Doug Maxey wrote:
> Mark,
> 
> I have been tweaking the idedisk_setup() and write_cache() to handle
> drives with write cache disabled by default and the barrier settings on
> changes between WC enabled and disabled.
> 
> Bart has pointed out in offline mail, and testing has confirmed, that 
> HDIO_DRIVE_CMD is used, which bypasses the settings parameter lookup 
> in generic_ide_ioctl() of the drive settings enabled in ide_add_settings().  
> 
> Is it reasonable that a change could be made to enable the use of
> HDIO_SET_WCACHE in hdparm?
> 
> Or should I be looking to intercept the call and do The Right Thing
> (TM:) in the ide driver?
> 
> 
> ++doug
> 
> 
> 
> 
> 



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

* Re: hdparm write cache settings
  2004-10-19 21:47 ` Mark Lord
@ 2004-10-21 16:54   ` Doug Maxey
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Maxey @ 2004-10-21 16:54 UTC (permalink / raw)
  To: Mark Lord; +Cc: Doug Maxey, Linux IDE Mailing List


On Tue, 19 Oct 2004 17:47:31 EDT, Mark Lord wrote:
>Hi,
>
>Sure, I can update hdparm to first attempt HDIO_SET_WCACHE.
>If that call is nak'd (usually due to lack of kernel support for it),
>then hdparm will use HDIO_DRIVE_CMD as a fallback.
>
>This is a VERY popular setting among end-users of Linux.
>

I agree this is popular, but from my investigation, it does not really work,
i.e., the drive may take the command, but the ide driver never truly
does the work to fully implement the changed setting.  Especially when going 
from cache disabled to enabled.

A patch has been submitted (but nak'd) to the do the intercept on
HDIO_DRIVE_CMD and a small rework to actually have the setting "stick"
as it were, with the correct barrier changes in the block layer.  See subj
"honor disk write cache setting" on ide list.

++doug



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

end of thread, other threads:[~2004-10-21 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15 19:48 hdparm write cache settings Doug Maxey
2004-10-19 21:47 ` Mark Lord
2004-10-21 16:54   ` Doug Maxey

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