public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@crca.org.au>
To: "Leisner, Martin" <Martin.Leisner@xerox.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: syncing the disks when entering sleep
Date: Sat, 23 Jan 2010 09:06:50 +1100	[thread overview]
Message-ID: <4B5A217A.4090107@crca.org.au> (raw)
In-Reply-To: <4B5A1EE1.5040005@crca.org.au>

Hi again.

Nigel Cunningham wrote:
> Hi.
> 
> Leisner, Martin wrote:
>>>   -----Original Message-----
>>>   From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
>>>   Sent: Friday, January 22, 2010 4:38 PM
>>>   To: Leisner, Martin
>>>   Cc: Nigel Cunningham; linux-pm@lists.linux-foundation.org
>>>   Subject: Re: [linux-pm] syncing the disks when entering sleep
>>>   
>>>   On Friday 22 January 2010, Leisner, Martin wrote:
>>>   > To clarify what I proposed:
>>>   >
>>>   > if(user sets knobs)
>>>   >     if(disk is spun up)
>>>   >          sync
>>>   >
>>>   > currently the algorithm is
>>>   >
>>>   >     sync
>>>   
>>>   Yes, but Nigel said it should be
>>>   
>>>   if(user knob is unset)
>>>             sync
>>>   
>>>   which I agree with.
>>>   
>>>   [BTW, please don't top-post in future.]
>>>   
>>>   Rafael
>> if(knob is set) {
>>     if(disk is spun up)
>>        sync
>> } else sync
>>
>> The spinup of the disk can have a very noticeable amount of time...if the user doesn't care about syncing, then the top is preferred...

Sorry to reply to myself but...

> That sounds much better; thanks.

I shouldn't have said that - as Rafael said

if (knob is unset)
  sync

provides much more predictable behaviour. I know you want the code to
look at whether the disk is spun up, but that makes things more
unpredictable. Imagine a situation where you get some error in which
whether we synced or not is important - reproducing, diagnosing and
fixing the issue gets more complicated if we go your way.

The other issue would be detecting whether disks (there might be more
than one!) are spun up. That, in itself, would probably require a lot of
extra code to get the info from the drivers.

An explicit and unconditional disabling of syncing is simpler.

Regards,

Nigel

  reply	other threads:[~2010-01-22 22:06 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-22 15:59 syncing the disks when entering sleep Leisner, Martin
2010-01-22 20:49 ` Rafael J. Wysocki
2010-01-22 21:31   ` Nigel Cunningham
2010-01-22 21:33     ` Leisner, Martin
2010-01-22 21:38       ` Rafael J. Wysocki
2010-01-22 21:40         ` Leisner, Martin
2010-01-22 21:55           ` Nigel Cunningham
2010-01-22 22:06             ` Nigel Cunningham [this message]
2010-01-22 21:35     ` Rafael J. Wysocki
2010-01-26 13:59   ` Pavel Machek
2010-01-26 18:17     ` Rafael J. Wysocki
2010-01-26 14:51       ` Pavel Machek
2010-01-27  0:51         ` Rafael J. Wysocki
2010-01-27  6:45           ` Pavel Machek
2010-01-27  7:29             ` Nigel Cunningham
2010-01-27 20:50             ` Rafael J. Wysocki
2010-01-28  7:26               ` Pavel Machek
2010-01-28 10:43                 ` Rafael J. Wysocki
2010-04-05  6:38                   ` document open(/dev/snapshot) sideeffects -- was " Pavel Machek
     [not found]                   ` <20100405063852.GA1924@elf.ucw.cz>
2010-04-23 18:28                     ` Rafael J. Wysocki
     [not found]                     ` <201004232028.56005.rjw@sisk.pl>
2010-04-24  5:42                       ` Pavel Machek
2010-01-27  9:55           ` Pavel Machek
2010-01-27 20:46             ` Rafael J. Wysocki
2010-01-31  8:52               ` Pavel Machek
2010-01-31 12:33                 ` Rafael J. Wysocki
2010-02-01 10:49                   ` Pavel Machek
2010-02-01 17:13                     ` Leisner, Martin
2010-02-01 21:09                       ` Pavel Machek
2010-02-02  4:13                         ` Nigel Cunningham
2010-02-10  8:13                           ` Pavel Machek
2010-02-10 10:34                             ` Rafael J. Wysocki
2010-02-10 10:38                               ` Oliver Neukum
2010-02-10 10:58                                 ` Rafael J. Wysocki
2010-02-10 11:02                                   ` Oliver Neukum
2010-02-10 18:42                                     ` Rafael J. Wysocki
2010-02-15 20:28                                       ` Matthew Garrett
2010-02-16  6:38                                       ` Pavel Machek
2010-02-10 13:31                               ` Pavel Machek
2010-02-10 19:19                                 ` Rafael J. Wysocki
2010-02-10 21:17                                   ` Leisner, Martin
2010-02-11 14:49                                     ` Pavel Machek
2010-02-11 15:00                                   ` Pavel Machek
2010-02-11 17:28                                     ` Rafael J. Wysocki
2010-02-11 20:17                                       ` Nigel Cunningham
2010-02-10 20:58                               ` Leisner, Martin
2010-02-01 20:55                     ` Nigel Cunningham
2010-02-01 21:07                       ` Pavel Machek
2010-02-01 22:03                         ` Nigel Cunningham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5A217A.4090107@crca.org.au \
    --to=ncunningham@crca.org.au \
    --cc=Martin.Leisner@xerox.com \
    --cc=linux-pm@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox