mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Martin Diehl <lists@mdiehl.de>
Cc: Jean Tourrilhes <jt@hpl.hp.com>,
	Neil Brown <neilb@cse.unsw.edu.au>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Provide refrigerator support for irda
Date: Thu, 26 Jun 2003 20:44:46 +0200	[thread overview]
Message-ID: <20030626184446.GB16172@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44.0306252308070.14534-100000@notebook.home.mdiehl.de>

Hi!

> > > Admittedly I didn't care about swsusp so far. Given the big fat warning on 
> > > top of Documentation/swsusp.txt I would not even try and i personally 
> > > don't see what I would miss without swsusp.
> > 
> > That's okay... Just support your DMA-ing devices are supported.
> 
> No matter whether it would be ISA-DMA or PCI busmastering I guess?

Any DMA is a problem.

> Not sure whether we can claim most irda drivers ready for swsusp then.
> vlsi_ir should be fine and for irda-usb I assume it would be up to the
> hcd - but don't know about the others...

Well, at least SIR should work as it works over normal serial, IIRC.

> > If it is possible to sleep at place "a", and no locks needed for
> > suspend are held at "a", inserting 
> > 
> > 	if (current->flags & PF_FREEZE)
> > 		refrigerator(PF_IOTHREAD);
> > 
> > is the right thing to do.
> 
> Ok, so the proposed patch is doing the right thing and should be applied.
> 
> Pavel, two more questions:
> 
> * For a kernel compiled with CONFIG_SWSUSP=n, may I assume PF_FREEZE would 
>   never be set or at least refrigerator would be noop?

PF_FREEZE is 0 so if() never succeeds.

> * Isn't there a race on SMP (and probably UP with CONFIG_PREEMPT) when 
>   PF_FREEZE gets modified by another cpu right after the test?

Only task itself ever clears its PF_FREEZE. That means there should be
no problem.
									Pavel

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

      reply	other threads:[~2003-06-26 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-25  1:56 Neil Brown
2003-06-25  2:10 ` Jean Tourrilhes
2003-06-25  6:18   ` Martin Diehl
2003-06-25 18:45     ` Pavel Machek
2003-06-26 13:27       ` Martin Diehl
2003-06-26 18:44         ` Pavel Machek [this message]

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=20030626184446.GB16172@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@mdiehl.de \
    --cc=neilb@cse.unsw.edu.au \
    /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

all inboxes | Powered by JetHome®