public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: David Woodhouse <dwmw2@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: JFFS2 swsusp / signal cleanup.
Date: Sun, 5 Oct 2003 21:13:45 +0200	[thread overview]
Message-ID: <20031005191344.GA963@elf.ucw.cz> (raw)
In-Reply-To: <20031005171916.B21478@flint.arm.linux.org.uk>

Hi!

> > Is flush_signals() really so stupid to do? Goal was to make
> > modifications to code as simple as possible, and as most pieces do not
> > expect to be interrupted, pretending signal never happened seems like
> > good idea...
> 
> What if that signal was necessary for the operation of the thread, and
> dropping it would cause a problem?
> 
> Since you're effectively using signal handling to cause a false pending
> signal indication, surely the correct cleanup is to re-calculate the
> pending signal indication.  That way, we won't be throwing away
> signals.

Should I do recalc_sigpending() instead of flush_signals(current)?

> I'm also wondering if there could be a problem with (ab)using TASK_STOPPED
> here - could a stopped task be woken prematurely and thereby sent spinning
> in refrigerator() by a non-stopped process sending a SIGCONT at just the
> right time?
> 
> Maybe we want a TASK_FROZEN state to describe the "frozen, may not be woken
> by anything except thawing" state?

That would certainly be cleaner, but I think it would require
modifications all over the kernel...

That SIGCONT race... while() in refrigerator() should catch
that. Maybe we spin, but we go back to sleep pretty soon.

							Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

  reply	other threads:[~2003-10-05 19:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-04 11:25 JFFS2 swsusp / signal cleanup David Woodhouse
2003-10-05 16:11 ` Pavel Machek
2003-10-05 16:19   ` Russell King
2003-10-05 19:13     ` Pavel Machek [this message]
2003-10-05 20:07       ` David Woodhouse
2003-10-09  0:23         ` [pm] " Pavel Machek
2003-10-09  0:29           ` David Woodhouse
2003-10-09  9:24             ` 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:
  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=20031005191344.GA963@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.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