LKML Archive on
help / color / mirror / Atom feed
From: Christoph Hellwig <>
To: akuster <>
Subject: Re: [patch 1/1] PM: Adds remount fs ro at suspend
Date: Mon, 5 Feb 2007 16:56:11 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sat, Feb 03, 2007 at 03:34:57PM -1000, akuster wrote:
> >Can you please explain why this can't be done in userspace?  
> I am sure it can.  The idea came from customer inputs, speed is my 
> guess. echo mem > /sys/../state seems a whole lot simpler and cleaner 
> than having userspace figure out what it mounted and then doing echo mem.

I don't think we really want people to use the kernel interface directly.
Currently the distros seem to use the s2ram and s2disk helpers IIRC.

In any case there should be a userland abstraction doing all helper work
and finally calling into the kernel.

It would be nice if the embedded folk could work together with the desktop
people on the userland bits for power managment.

> In fact
> >all existing suspend solutions seem to be doing fine doing things like
> >this in userspace.
> I guess I missed that boat. If you don't mind, could you point at one 
> solution.

> >NACK.  emergency_remount is exactly what it sais and should never ever
> >be used for a system that you want to keep on using later on.  
> The code "emergency_remount" is almost identical to what we have been 
> using. I wanted to reuse existing code rather than dup it.

The problem with emergency_remount is that it calls do_remount_sb with
the force argument, which then calls into mark_files_ro.  This isn't
very useful because it doesn't actually stop existing writers and seems
to have a racy f_mode access.  Then again it doesn't really help either
that we want to get rid of file_list_lock the sb->s_files :)

If you really want to stop all current writes you need to call freeze_bdev,
and I'd rather expose that through a separate user interface instead of
hooking it into the suspend process at the kernel side.  For XFS you
could use the private ioctls already today, but I'd prefer a more general

  reply	other threads:[~2007-02-05 16:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02 23:50 akuster
2007-02-03  0:16 ` Andrew Morton
2007-02-03  0:35   ` Henrique de Moraes Holschuh
2007-02-05 21:28     ` Nigel Cunningham
2007-02-05 21:35       ` Christoph Hellwig
2007-02-06 14:32       ` Henrique de Moraes Holschuh
2007-02-06 18:07         ` Rafael J. Wysocki
2007-02-06 21:38         ` Nigel Cunningham
2007-02-07 11:25           ` Henrique de Moraes Holschuh
2007-02-07 11:43             ` Nigel Cunningham
2007-02-07 12:05               ` Henrique de Moraes Holschuh
2007-02-07 14:10                 ` Rafael J. Wysocki
2007-02-09 22:24             ` Pavel Machek
2007-02-13 12:12         ` Pavel Machek
2007-02-03  0:57   ` akuster
2007-02-03 10:08 ` Christoph Hellwig
2007-02-04  1:34   ` akuster
2007-02-05 16:56     ` Christoph Hellwig [this message]
2007-02-14 11:07     ` Pavel Machek
2007-02-03 16:19 ` Pavel Machek

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:

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

  git send-email \ \ \ \ \ \
    --subject='Re: [patch 1/1] PM: Adds remount fs ro at suspend' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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