public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@users.sourceforge.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Daniel Jacobowitz <dan@debian.org>,
	viro@parcelfarce.linux.theplanet.co.uk,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: PATCH: Export console functions for	use	by	Software	Suspend	nice display
Date: Fri, 23 Jan 2004 16:27:22 +1300	[thread overview]
Message-ID: <1074828441.31164.210.camel@laptop-linux> (raw)
In-Reply-To: <1074827571.974.191.camel@gaston>

[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]

Hi.

On Fri, 2004-01-23 at 16:12, Benjamin Herrenschmidt wrote:
> > Locking is not an issue. This is suspend-to-disk. Everything else is
> > stopped while we're working.
> 
> No. You can still get a printk from irq... 

Mmm. But we also adjust the console loglevel depending upon the
verbosity of debugging info required. (And reset it when we're done).
When the nice display is on, the loglevel is 0 or 1. If a driver wants
to printk at KERN_EMERG or KERN_ALERT then, well the display should get
messed up a little :>

> > By the way, am I understanding the suggestion correctly? Do you
> > (collective) mean getting a fd for /dev/console from within kernel code
> > and using that? I've been looking at the way printk works and wondering
> > if con->write is equivalent (once I find the right console to write to)?
> 
> Yes. get an fd and write to it. grep for write to find other uses :)

I did. Didn't find much. I'll look again. Perhaps I'm just blind :>

> You may have to be a bit careful about what context you are in, but I
> suppose it's whatever userland process triggered the sleep in the
> first place, no ? For load, it's probably whatever process did swapon ?

No. There's a kernel daemon - kswsuspd - that does all the hard work.
The userland process that initiates the suspend sleeps in
wait_for_completion until post resume. At boot time, we initiate the
resume via an init call. Still fine?

Regards,

Nigel
.
-- 
My work on Software Suspend is graciously brought to you by
LinuxFund.org.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-01-23  3:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-22  8:12 PATCH: Export console functions for use by Software Suspend nice display Nigel Cunningham
2004-01-22  8:24 ` viro
2004-01-22 18:38   ` Nigel Cunningham
2004-01-22 20:35     ` Daniel Jacobowitz
2004-01-23  2:49       ` Benjamin Herrenschmidt
2004-01-23  3:07         ` Nigel Cunningham
2004-01-23  3:12           ` Benjamin Herrenschmidt
2004-01-23  3:27             ` Nigel Cunningham [this message]
2004-01-23  3:18           ` Nigel Cunningham
2004-01-22  8:28 ` Christoph Hellwig
2004-01-22  9:02   ` 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=1074828441.31164.210.camel@laptop-linux \
    --to=ncunningham@users.sourceforge.net \
    --cc=benh@kernel.crashing.org \
    --cc=dan@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox