All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Tejun Heo <tj@kernel.org>
Cc: "Russell King - ARM Linux" <linux@arm.linux.org.uk>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: try_to_freeze() called with IRQs disabled on ARM
Date: Thu, 25 Aug 2011 01:15:25 +0200	[thread overview]
Message-ID: <201108250115.25987.rjw@sisk.pl> (raw)
In-Reply-To: <20110823223518.GI2803@mtj.dyndns.org>

On Wednesday, August 24, 2011, Tejun Heo wrote:
> On Wed, Aug 24, 2011 at 12:17:03AM +0200, Tejun Heo wrote:
> > if (freezing() && IRQ disabled) {
> >       bust on IRQ;
> >       try_to_freeze();
> >       replug IRQ;
> > }
> > 
> > But, that can't be right. The current code isn't triggering warning
> > from scheduler code, right? If the above is the case, it should be
> > triggering that. What am I missing?
> 
> I think the refrigerator() code was actually doing that through
> spin_[un]lock_irq(), so it was accidentally masking the problem.  It
> definitely seems to need fixing.
> 
> Anyways, for now, we can do two things,
> 
> 1. if (freezing()) { irq_save; try_to_freeze(); irq_restore; } w/ BIG
>    FAT UGLY comment.
> 
> 2. Drop might_sleep() from try_to_freeze().  Moving it to
>    refrigerator() wouldn't help much.  It would just trigger more
>    sporadically during freeze, which is arguably worse than now.
> 
> I'd prefer #1 given that it documents the breakage while also
> restoring the IRQ state afterwards FWIW.

OK, I'm fine with 1.

Thanks,
Rafael

WARNING: multiple messages have this Message-ID (diff)
From: rjw@sisk.pl (Rafael J. Wysocki)
To: linux-arm-kernel@lists.infradead.org
Subject: try_to_freeze() called with IRQs disabled on ARM
Date: Thu, 25 Aug 2011 01:15:25 +0200	[thread overview]
Message-ID: <201108250115.25987.rjw@sisk.pl> (raw)
In-Reply-To: <20110823223518.GI2803@mtj.dyndns.org>

On Wednesday, August 24, 2011, Tejun Heo wrote:
> On Wed, Aug 24, 2011 at 12:17:03AM +0200, Tejun Heo wrote:
> > if (freezing() && IRQ disabled) {
> >       bust on IRQ;
> >       try_to_freeze();
> >       replug IRQ;
> > }
> > 
> > But, that can't be right. The current code isn't triggering warning
> > from scheduler code, right? If the above is the case, it should be
> > triggering that. What am I missing?
> 
> I think the refrigerator() code was actually doing that through
> spin_[un]lock_irq(), so it was accidentally masking the problem.  It
> definitely seems to need fixing.
> 
> Anyways, for now, we can do two things,
> 
> 1. if (freezing()) { irq_save; try_to_freeze(); irq_restore; } w/ BIG
>    FAT UGLY comment.
> 
> 2. Drop might_sleep() from try_to_freeze().  Moving it to
>    refrigerator() wouldn't help much.  It would just trigger more
>    sporadically during freeze, which is arguably worse than now.
> 
> I'd prefer #1 given that it documents the breakage while also
> restoring the IRQ state afterwards FWIW.

OK, I'm fine with 1.

Thanks,
Rafael

  reply	other threads:[~2011-08-24 23:13 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 15:19 try_to_freeze() called with IRQs disabled on ARM Mark Brown
2011-08-23 15:19 ` Mark Brown
2011-08-23 15:43 ` Russell King - ARM Linux
2011-08-23 15:43   ` Russell King - ARM Linux
2011-08-23 22:08   ` Rafael J. Wysocki
2011-08-23 22:08     ` Rafael J. Wysocki
2011-08-23 21:51 ` Rafael J. Wysocki
2011-08-23 21:51   ` Rafael J. Wysocki
2011-08-23 21:53   ` Tejun Heo
2011-08-23 21:53     ` Tejun Heo
2011-08-23 22:00     ` Russell King - ARM Linux
2011-08-23 22:00       ` Russell King - ARM Linux
2011-08-23 22:08       ` Tejun Heo
2011-08-23 22:08         ` Tejun Heo
2011-08-23 22:13         ` Russell King - ARM Linux
2011-08-23 22:13           ` Russell King - ARM Linux
2011-08-23 22:17           ` Tejun Heo
2011-08-23 22:17             ` Tejun Heo
2011-08-23 22:35             ` Tejun Heo
2011-08-23 22:35               ` Tejun Heo
2011-08-24 23:15               ` Rafael J. Wysocki [this message]
2011-08-24 23:15                 ` Rafael J. Wysocki
2011-08-25 12:14             ` Russell King - ARM Linux
2011-08-25 12:14               ` Russell King - ARM Linux
2011-08-25 12:17               ` Tejun Heo
2011-08-25 12:17                 ` Tejun Heo
2011-08-25 12:25                 ` Russell King - ARM Linux
2011-08-25 12:25                   ` Russell King - ARM Linux
2011-08-25 12:35                   ` Tejun Heo
2011-08-25 12:35                     ` Tejun Heo
2011-08-25 13:04                     ` Russell King - ARM Linux
2011-08-25 13:04                       ` Russell King - ARM Linux
2011-08-25 13:09                       ` Tejun Heo
2011-08-25 13:09                         ` Tejun Heo
2011-08-25 14:55                         ` Russell King - ARM Linux
2011-08-25 14:55                           ` Russell King - ARM Linux
2011-08-26 14:44                           ` Arnd Bergmann
2011-08-26 14:44                             ` Arnd Bergmann
2011-09-01 13:41                             ` Ulrich Weigand
2011-09-01 13:41                               ` Ulrich Weigand
2011-09-01 14:00                               ` Russell King - ARM Linux
2011-09-01 14:00                                 ` Russell King - ARM Linux
2011-09-02 14:47                                 ` Ulrich Weigand
2011-09-02 14:47                                   ` Ulrich Weigand
2011-09-02 17:22                                   ` Russell King - ARM Linux
2011-09-02 17:22                                     ` Russell King - ARM Linux
2011-09-02 17:40                                     ` Ulrich Weigand
2011-09-02 17:40                                       ` Ulrich Weigand
2011-09-02 17:48                                       ` Russell King - ARM Linux
2011-09-02 17:48                                         ` Russell King - ARM Linux
2011-09-16 10:31                                         ` Martin Schwidefsky
2011-09-16 10:31                                           ` Martin Schwidefsky
2011-09-27 17:45                                         ` Ulrich Weigand
2011-09-27 17:45                                           ` Ulrich Weigand
2011-08-30 20:58                           ` Mark Brown
2011-08-30 20:58                             ` Mark Brown
2011-08-30 21:10                             ` Russell King - ARM Linux
2011-08-30 21:10                               ` Russell King - ARM Linux
2012-06-26 16:39                           ` Mandeep Singh Baines
2012-06-26 16:39                             ` Mandeep Singh Baines
2012-06-26 17:16                             ` Russell King - ARM Linux
2012-06-26 17:16                               ` Russell King - ARM Linux
2011-08-23 22:13     ` Rafael J. Wysocki
2011-08-23 22:13       ` Rafael J. Wysocki
2011-08-25 11:37   ` Mark Brown
2011-08-25 11:37     ` Mark Brown

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=201108250115.25987.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tj@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 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.