public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@crca.org.au>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rafael Wysocki <rjw@sisk.pl>, Ingo Molnar <mingo@elte.hu>,
	Nathan Lynch <ntl@pobox.com>,
	Nigel Cunningham <nigel@tuxonice.net>,
	stable@kernel.org, containers@lists.linux-foundation.org,
	linux-pm@lists.linux-foundation.org,
	Matt Helsley <matthltc@us.ibm.com>
Subject: Re: [patch 2/2] sched: fix nr_uninterruptible accounting of frozen tasks really
Date: Sat, 18 Jul 2009 08:26:58 +1000	[thread overview]
Message-ID: <4A60FAB2.6030906@crca.org.au> (raw)
In-Reply-To: <alpine.LFD.2.00.0907171441020.11571@localhost.localdomain>

Hi.

Thomas Gleixner wrote:
> On Fri, 17 Jul 2009, Peter Zijlstra wrote:
> 
>> On Fri, 2009-07-17 at 12:25 +0000, Thomas Gleixner wrote:
>>> plain text document attachment (freezer-fix-accounting-for-real.patch)
>>> commit e3c8ca8336 (sched: do not count frozen tasks toward load) broke
>>> the nr_uninterruptible accounting on freeze/thaw. On freeze the task
>>> is excluded from accounting with a check for (task->flags &
>>> PF_FROZEN), but that flag is cleared before the task is thawed. So
>>> while we prevent that the freezing task with state
>>> TASK_UNINTERRUPTIBLE is accounted to nr_uninterruptible we decrement
>>> nr_uninterruptible on thaw.
>>>
>>> Use a separate flag which is handled by the freezing task itself. Set
>>> it before calling the scheduler with TASK_UNINTERRUPTIBLE state and
>>> clear it after we return from frozen state.
>> Right, so I'm wondering why we don't fully revert e3c8ca8336 to begin
>> with.
> 
> Fine with me, but it seems that the cgroup folks have some luser space
> stuff looking at proc/loadavg which goes berserk when loadavg
> increases rapidly due to freezing. OTOH that stuff seems to be
> oblivious to the fact that the commit in question brings loadavg
> irreversibly to 0 when you do enough freeze/thaw cycles.

That's right. I don't remember the exact details (it's been ages since
this was first reported to me), but sendmail (IIRC) was looking at the
load average and stopping delivery until it dropped sufficiently.

Historically, my solution has been to save and restore the load average
values (on the theory that hibernation should be transparent to
userspace), but I dropped that in favour of this approach.

Regards,

Nigel

  reply	other threads:[~2009-07-17 22:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 12:24 [patch 0/2] fix load average accounting Thomas Gleixner
2009-07-17 12:24 ` [patch 1/2] sched: fix load average accounting vs. cpu hotplug Thomas Gleixner
2009-07-17 12:25 ` [patch 2/2] sched: fix nr_uninterruptible accounting of frozen tasks really Thomas Gleixner
2009-07-17 12:31   ` Peter Zijlstra
2009-07-17 12:48     ` Thomas Gleixner
2009-07-17 22:26       ` Nigel Cunningham [this message]
2009-07-17 15:22     ` Matt Helsley
2009-07-17 16:47       ` Peter Zijlstra
2009-07-17 20:55         ` Nathan Lynch
2009-07-18 12:56           ` Peter Zijlstra
2009-07-18 23:59             ` Nathan Lynch
2009-07-17 15:51   ` Matt Helsley
2009-07-17 15:55     ` Peter Zijlstra
2009-07-17 16:20       ` Matt Helsley
2009-07-17 20:54   ` Nathan Lynch

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=4A60FAB2.6030906@crca.org.au \
    --to=ncunningham@crca.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=matthltc@us.ibm.com \
    --cc=mingo@elte.hu \
    --cc=nigel@tuxonice.net \
    --cc=ntl@pobox.com \
    --cc=peterz@infradead.org \
    --cc=rjw@sisk.pl \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    /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