All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Christoph Hellwig <hch@infradead.org>,
	Takashi Sato <t-sato@yk.jp.nec.com>,
	akpm@linux-foundation.org, viro@ZenIV.linux.org.uk,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.or
Subject: Re: [PATCH 3/3] Add timeout feature
Date: Wed, 9 Jul 2008 22:44:13 +0200	[thread overview]
Message-ID: <20080709204412.GG11006@ucw.cz> (raw)
In-Reply-To: <20080709005254.GQ11558@disturbed>

Hi!

> > > > > I still disagree with this whole patch.  There is not reason to let
> > > > > the freeze request timeout - an auto-unfreezing will only confuse the
> > > > > hell out of the caller.  The only reason where the current XFS freeze
> > > > > call can hang and this would be theoretically useful is when the
> > > > 
> > > > What happens when someone dirties so much data that vm swaps out
> > > > whatever process that frozen the filesystem?
> > > 
> > > a) you can't dirty a frozen filesystem - by definition a frozen
> > >    filesystem is a *clean filesystem* and *cannot be dirtied*.
> > 
> > Can you stop me?
> > 
> > mmap("/some/huge_file", MAP_SHARED);
> > 
> > then write to memory mapping?
> 
> Sure - we can put a hook in ->page_mkwrite() to prevent it.  We
> don't right now because nobody in the real world really cares if one
> half of a concurrent user data change is in the old snapshot or the
> new one......
> 
> > > b) Swap doesn't write through the filesystem
> > > c) you can still read from a frozen filesystem to page your
> > >    executable?? in.
> > 
> > atime modification should mean dirty data, right?
> 
> Metadata, not data. If that's really a problem (and it never has
> been for XFS because we always allow in memory changes to atime)
> then touch_atime could be easily changed to avoid this...
> 
> > And dirty data mean
> > memory pressure, right? 
> 
> If you walk enough inodes while the filesystem is frozen, it
> theoretically could happen.  Typically a filesystem is only for a
> few seconds at a time so in the real world this has never, ever been
> a problem.

So we have freezing interface that does not really freeze, and
that can break the system when filesystem is frozen for too long...
:-(.

Maybe you could use process freezer -- cgroup people are adding
userspace interface to that -- to solve those... but that would mean
stopping everyone but thread doing freezing...

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@suse.cz>
To: Christoph Hellwig <hch@infradead.org>,
	Takashi Sato <t-sato@yk.jp.nec.com>,
	akpm@linux-foundation.org, viro@ZenIV.linux.org.uk,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	axboe@kernel.dk, mtk.manpages@googlemail.com
Subject: Re: [PATCH 3/3] Add timeout feature
Date: Wed, 9 Jul 2008 22:44:13 +0200	[thread overview]
Message-ID: <20080709204412.GG11006@ucw.cz> (raw)
In-Reply-To: <20080709005254.GQ11558@disturbed>

Hi!

> > > > > I still disagree with this whole patch.  There is not reason to let
> > > > > the freeze request timeout - an auto-unfreezing will only confuse the
> > > > > hell out of the caller.  The only reason where the current XFS freeze
> > > > > call can hang and this would be theoretically useful is when the
> > > > 
> > > > What happens when someone dirties so much data that vm swaps out
> > > > whatever process that frozen the filesystem?
> > > 
> > > a) you can't dirty a frozen filesystem - by definition a frozen
> > >    filesystem is a *clean filesystem* and *cannot be dirtied*.
> > 
> > Can you stop me?
> > 
> > mmap("/some/huge_file", MAP_SHARED);
> > 
> > then write to memory mapping?
> 
> Sure - we can put a hook in ->page_mkwrite() to prevent it.  We
> don't right now because nobody in the real world really cares if one
> half of a concurrent user data change is in the old snapshot or the
> new one......
> 
> > > b) Swap doesn't write through the filesystem
> > > c) you can still read from a frozen filesystem to page your
> > >    executable?? in.
> > 
> > atime modification should mean dirty data, right?
> 
> Metadata, not data. If that's really a problem (and it never has
> been for XFS because we always allow in memory changes to atime)
> then touch_atime could be easily changed to avoid this...
> 
> > And dirty data mean
> > memory pressure, right? 
> 
> If you walk enough inodes while the filesystem is frozen, it
> theoretically could happen.  Typically a filesystem is only for a
> few seconds at a time so in the real world this has never, ever been
> a problem.

So we have freezing interface that does not really freeze, and
that can break the system when filesystem is frozen for too long...
:-(.

Maybe you could use process freezer -- cgroup people are adding
userspace interface to that -- to solve those... but that would mean
stopping everyone but thread doing freezing...

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2008-07-09 20:56 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-30 12:24 [PATCH 3/3] Add timeout feature Takashi Sato
2008-06-30 12:24 ` Takashi Sato
2008-07-01  8:10 ` Christoph Hellwig
2008-07-01 10:52   ` Alasdair G Kergon
2008-07-01 10:52     ` [dm-devel] " Alasdair G Kergon
2008-07-03 12:11     ` Takashi Sato
2008-07-03 12:11       ` [dm-devel] " Takashi Sato
2008-07-03 12:11       ` Takashi Sato
2008-07-03 12:47       ` Alasdair G Kergon
2008-07-03 12:47         ` [dm-devel] " Alasdair G Kergon
2008-07-03 22:11         ` Dave Chinner
2008-07-03 22:11         ` [dm-devel] " Dave Chinner
2008-07-03 22:11           ` Dave Chinner
2008-07-04 12:08           ` Takashi Sato
2008-07-04 12:08             ` Takashi Sato
2008-07-03 14:45       ` Eric Sandeen
2008-07-07 11:07   ` Pavel Machek
2008-07-08 23:10     ` Dave Chinner
2008-07-08 23:10       ` Dave Chinner
2008-07-08 23:20       ` Pavel Machek
2008-07-08 23:20       ` Pavel Machek
2008-07-08 23:20         ` Pavel Machek
2008-07-09  0:52         ` Dave Chinner
2008-07-09  1:09           ` Theodore Tso
2008-07-09  1:09           ` Theodore Tso
2008-07-09  1:09           ` Theodore Tso
2008-07-09  1:09             ` Theodore Tso
2008-07-09  4:21             ` Brad Boyer
2008-07-09  4:21             ` Brad Boyer
2008-07-09  4:21               ` Brad Boyer
2008-07-09  4:21             ` Brad Boyer
2008-07-09  6:13             ` Miklos Szeredi
2008-07-09  6:16               ` Christoph Hellwig
2008-07-09  6:22                 ` Miklos Szeredi
2008-07-09  6:22                   ` Miklos Szeredi
2008-07-09  6:22                   ` Miklos Szeredi
2008-07-09  6:41                   ` Arjan van de Ven
2008-07-09  6:41                     ` Arjan van de Ven
2008-07-09  6:41                     ` Arjan van de Ven
2008-07-09  6:48                     ` Miklos Szeredi
2008-07-09  6:48                       ` Miklos Szeredi
2008-07-09  6:55                       ` Arjan van de Ven
2008-07-09  6:55                         ` Arjan van de Ven
2008-07-09  6:55                         ` Arjan van de Ven
2008-07-09  7:08                         ` Miklos Szeredi
2008-07-09  7:08                           ` Miklos Szeredi
2008-07-09 20:48                           ` Pavel Machek
2008-07-09  7:13                         ` Dave Chinner
2008-07-09 11:09                           ` Theodore Tso
2008-07-09 11:09                           ` Theodore Tso
2008-07-09 11:09                             ` Theodore Tso
2008-07-09 11:49                             ` Dave Chinner
2008-07-09 11:49                             ` Dave Chinner
2008-07-09 11:49                               ` Dave Chinner
2008-07-09 12:24                               ` Theodore Tso
2008-07-09 12:24                               ` Theodore Tso
2008-07-09 12:24                                 ` Theodore Tso
2008-07-09 12:59                                 ` Olaf Frączyk
2008-07-09 13:57                                   ` Arjan van de Ven
2008-07-09 13:57                                     ` Arjan van de Ven
2008-07-09 13:55                               ` Arjan van de Ven
2008-07-09 13:58                               ` jim owens
2008-07-09 14:13                                 ` jim owens
2008-07-13 12:06                                 ` Pavel Machek
2008-07-13 17:15                                   ` jim owens
2008-07-14  6:36                                     ` Pavel Machek
2008-07-14 13:17                                       ` jim owens
2008-07-14 13:12                                 ` Takashi Sato
2008-07-14 13:12                                   ` Takashi Sato
2008-07-14 14:04                                   ` jim owens
2008-07-09 11:49                             ` Dave Chinner
2008-07-09 13:53                           ` Arjan van de Ven
2008-07-09  6:59                     ` Dave Chinner
2008-07-09  7:13                       ` Miklos Szeredi
2008-07-09  7:33                         ` Dave Chinner
2008-07-09  7:33                           ` Dave Chinner
2008-07-09  8:11                           ` Miklos Szeredi
2008-07-09  8:11                             ` Miklos Szeredi
2008-07-09 11:15                             ` Dave Chinner
2008-07-09 11:15                               ` Dave Chinner
2008-07-09 20:44           ` Pavel Machek [this message]
2008-07-09 20:44             ` Pavel Machek
2008-07-09 20:44           ` Pavel Machek
2008-07-09 20:44           ` Pavel Machek
2008-07-08 23:20       ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2008-09-08 11:53 Takashi Sato
2008-09-08 11:53 ` Takashi Sato
2008-09-08 17:11 ` Christoph Hellwig
2008-09-25 21:06   ` Ric Wheeler
2008-09-26  8:52     ` Takashi Sato
2008-09-26  8:52       ` Takashi Sato
2008-09-26 10:58       ` Ric Wheeler
2008-09-29 11:11         ` Takashi Sato
2008-09-29 11:11           ` Takashi Sato
2008-09-29 11:11           ` Takashi Sato
2008-09-26 12:35       ` Valdis.Kletnieks
2008-09-26 12:35         ` Valdis.Kletnieks
2008-09-29 14:13       ` Christoph Hellwig
2008-09-29 14:36         ` Eric Sandeen
2008-09-29 14:36           ` Eric Sandeen
2008-09-29 14:37           ` Christoph Hellwig
2008-09-29 14:45             ` Eric Sandeen
2008-09-29 22:08               ` jim owens
2008-10-05 10:00               ` Pavel Machek
2008-10-09 10:12               ` Takashi Sato
2008-10-09 10:12                 ` Takashi Sato
2008-10-09 10:12                 ` Takashi Sato
2008-10-09 10:18                 ` Christoph Hellwig
2008-10-09 10:18                   ` Christoph Hellwig
2008-08-18 12:28 Takashi Sato
2008-08-18 12:28 ` Takashi Sato
2008-08-21 20:20 ` Andrew Morton
2008-08-21 20:20   ` Andrew Morton
2008-08-22 18:16   ` Christoph Hellwig
2008-08-22 18:16     ` Christoph Hellwig
2008-08-24 17:03   ` Oleg Nesterov
2008-08-29  9:39   ` Takashi Sato
2008-08-29  9:39     ` Takashi Sato
2008-08-29  9:39     ` Takashi Sato
2008-07-22  9:36 Takashi Sato
2008-07-22  9:36 Takashi Sato
2008-07-22  9:36 ` Takashi Sato
2008-07-22  9:36 ` Takashi Sato
2008-06-24  7:00 Takashi Sato
2008-06-24  7:00 ` Takashi Sato
2008-06-24 22:09 ` Andrew Morton
2008-06-27 11:33   ` Takashi Sato
2008-06-27 11:33     ` Takashi Sato
2008-06-27 11:33     ` Takashi Sato
2008-06-27 18:57     ` Andrew Morton
2008-06-29 23:13       ` Takashi Sato
2008-06-29 23:13         ` Takashi Sato
2008-06-29 23:13         ` Takashi Sato
2008-06-30  0:01         ` Andrew Morton
2008-06-30  0:01           ` Andrew Morton
2008-06-30  0:01           ` Andrew Morton

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=20080709204412.GG11006@ucw.cz \
    --to=pavel@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.or \
    --cc=t-sato@yk.jp.nec.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.