public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Jens Axboe <jens.axboe@oracle.com>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Is it supposed to be ok to call del_gendisk while userspace is frozen?
Date: Thu, 4 Mar 2010 21:15:48 +0100	[thread overview]
Message-ID: <20100304201548.GA1341@elf.ucw.cz> (raw)
In-Reply-To: <201003042026.30303.rjw@sisk.pl>

Hi!

> > My thought exactly.  This is the only approach that also solves the 
> > following race:
> > 
> > 	A driver is unloaded at the same time as a suspend starts.
> > 
> > 	The writeback thread gets frozen.
> > 
> > 	Then before the rmmod thread is frozen, it calls del_gendisk.
> > 
> > Delaying things by means of a workqueue (or the equivalent) might also 
> > work, but it doesn't seem as safe.  For example, some important 
> > writebacks might end up getting delayed until too late.

Delaying writebacks during sleep should be ok... That's why we do
sync() after userspace is frozen -- nothing really important should be
waiting for writeback after that point. 
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2010-03-04 20:15 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44L0.1003032142580.6963-100000@netrider.rowland.org>
2010-03-04 19:26 ` Is it supposed to be ok to call del_gendisk while userspace is frozen? Rafael J. Wysocki
     [not found] ` <201003042026.30303.rjw@sisk.pl>
2010-03-04 19:36   ` Alan Stern
2010-03-04 20:04     ` Rafael J. Wysocki
2010-03-04 20:15   ` Pavel Machek [this message]
2010-04-22 23:40     ` Matt Reimer
     [not found]     ` <y2yf383264b1004221640rd1fca614zfa15d7e7984ab3ba@mail.gmail.com>
2010-04-23  5:17       ` Rafael J. Wysocki
     [not found]       ` <201004230717.07086.rjw@sisk.pl>
2010-05-11 23:55         ` Matt Reimer
     [not found] <1275664778.4596.1.camel@maxim-laptop>
2010-06-04 17:52 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.1006041052570.1794-100000@iolanthe.rowland.org>
2010-06-04 15:19 ` Maxim Levitsky
     [not found] <1275650416.3403.5.camel@maxim-laptop>
2010-06-04 14:59 ` Alan Stern
     [not found] <201005182143.28004.rjw@sisk.pl>
2010-05-18 20:06 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.1005162219330.24400-100000@netrider.rowland.org>
2010-05-17  7:45 ` Nigel Cunningham
     [not found] ` <4BF0F3FF.2010603@crca.org.au>
2010-05-17 20:35   ` Rafael J. Wysocki
     [not found]   ` <201005172235.37824.rjw@sisk.pl>
2010-05-17 22:51     ` Nigel Cunningham
     [not found]     ` <4BF1C86B.8000203@crca.org.au>
2010-05-18 19:43       ` Rafael J. Wysocki
2010-05-24 19:02       ` Pavel Machek
     [not found]       ` <20100524190206.GL1292@ucw.cz>
2010-05-24 21:21         ` Nigel Cunningham
     [not found] <4BF06489.1050200@crca.org.au>
2010-05-17  2:22 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.1005142231390.11498-100000@netrider.rowland.org>
2010-05-15 20:30 ` Rafael J. Wysocki
     [not found] ` <201005152230.10230.rjw@sisk.pl>
2010-05-16  7:49   ` Nigel Cunningham
     [not found]   ` <4BEFA375.7030404@crca.org.au>
2010-05-16 19:38     ` Rafael J. Wysocki
     [not found]     ` <201005162138.07105.rjw@sisk.pl>
2010-05-16 21:32       ` Nigel Cunningham
     [not found] <Pine.LNX.4.44L0.1005142235580.11498-100000@netrider.rowland.org>
2010-05-15  2:53 ` Nigel Cunningham
     [not found] ` <4BEE0CC5.60804@crca.org.au>
2010-05-16 19:35   ` Rafael J. Wysocki
     [not found] <4BEC8173.4070500@crca.org.au>
2010-05-15  2:37 ` Alan Stern
     [not found] <AANLkTimW3wLEt-DIRirHic1ZN1Z0k1t3TavwaCxTh_QL@mail.gmail.com>
2010-05-13 21:54 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1005131752160.1731-100000@iolanthe.rowland.org>
2010-05-13 22:20   ` Matt Reimer
     [not found]   ` <AANLkTimBxoCCeT_ns30JTIGKqgkiRIvKTf4LfE3mopkS@mail.gmail.com>
2010-05-13 22:47     ` Nigel Cunningham
2010-05-15  2:32     ` Alan Stern
     [not found] <AANLkTikH7DvizJ9340SiksoIWU5KU2n-OCqWc4f_-z9v@mail.gmail.com>
2010-05-12 14:50 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1005121048420.1962-100000@iolanthe.rowland.org>
2010-05-13 21:44   ` Matt Reimer
     [not found] <201003040123.13617.rjw@sisk.pl>
2010-03-04  2:48 ` Alan Stern
     [not found] <20100303215056.GB2579@ucw.cz>
2010-03-03 22:23 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1003031720530.1380-100000@iolanthe.rowland.org>
2010-03-04  0:23   ` Rafael J. Wysocki
2010-03-04 13:53   ` Pavel Machek
     [not found]   ` <20100304135337.GC12191@atrey.karlin.mff.cuni.cz>
2010-06-04 11:20     ` Maxim Levitsky
     [not found] <20100301063508.GA1455@ucw.cz>
2010-03-01 15:23 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1003011021440.1645-100000@iolanthe.rowland.org>
2010-03-03 21:50   ` Pavel Machek
     [not found] <20100224191213.GH1025@kernel.dk>
2010-02-24 20:19 ` Alan Stern
     [not found] <20100223221635.GP1025@kernel.dk>
2010-02-24 15:59 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1002241051470.2436-100000@iolanthe.rowland.org>
2010-02-24 19:12   ` Jens Axboe
     [not found] <20100223155803.GN1025@kernel.dk>
2010-02-23 16:33 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1002231115510.1308-100000@iolanthe.rowland.org>
2010-02-23 22:16   ` Jens Axboe
     [not found] <20100223123321.GA1025@kernel.dk>
2010-02-23 15:29 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1002231016500.1507-100000@iolanthe.rowland.org>
2010-02-23 15:58   ` Jens Axboe
2010-03-01  6:35   ` Pavel Machek
     [not found] <201002152204.04148.rjw@sisk.pl>
2010-02-16 16:27 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1002161126340.1281-100000@iolanthe.rowland.org>
2010-02-20 22:22   ` Maxim Levitsky
2010-02-23 12:33   ` Jens Axboe
2010-02-13 13:29 Maxim Levitsky
2010-02-15 16:00 ` Maxim Levitsky
     [not found] ` <1266249634.10662.6.camel@maxim-laptop>
2010-02-15 21:04   ` Rafael J. Wysocki

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=20100304201548.GA1341@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    /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