From: Ingo Molnar <mingo@elte.hu>
To: matthieu castet <castet.matthieu@free.fr>
Cc: Lee Revell <rlrevell@joe-job.com>,
tglx@linutronix.de,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: High Resolution Timer DOS
Date: Sun, 29 Apr 2007 18:42:30 +0200 [thread overview]
Message-ID: <20070429164230.GA23337@elte.hu> (raw)
In-Reply-To: <4634C2F0.8050101@free.fr>
* matthieu castet <castet.matthieu@free.fr> wrote:
> Ok, may be DOS was not the correct term, [...]
ok, good that have that issue put aside ;-)
> [...] but with the 2.6.21 hrt there is a great difference between an
> infinite loop and the high-rate context-switching task (you can try
> attached programs). With the first I the system is still responsive,
> with the latter it isn't (new process take lot's of time to get
> created, other process are very slow). If it is "just 'CPU time used
> up'", why I see a such difference between the 2 cases ?
this is a pure scheduler thing: the scheduler treats sleepers
differently than CPU hogs. Try the same test for example under the
(ob'plug) CFS scheduler:
http://redhat.com/~mingo/cfs-scheduler/
and you'll see small_sleep.c being handled the same way as
infinite_loop.c. This is a CFS box with 20 small_sleep's running:
top - 20:41:02 up 1 min, 2 users, load average: 4.92, 1.27, 0.43
Tasks: 89 total, 22 running, 67 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.2%us, 46.5%sy, 1.7%ni, 17.7%id, 28.5%wa, 0.3%hi, 0.1%si, 0.0%st
Mem: 2053204k total, 103300k used, 1949904k free, 12096k buffers
Swap: 4096564k total, 0k used, 4096564k free, 43040k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2208 mingo 20 0 1576 256 208 R 4.5 0.0 0:01.08 small_sleep
2252 mingo 20 0 1580 260 208 R 4.5 0.0 0:00.71 small_sleep
2254 mingo 20 0 1576 256 208 R 4.5 0.0 0:00.61 small_sleep
and the system is still completely usable.
This isnt really about timers - you can achieve similar effects without
using any timers.
Ingo
prev parent reply other threads:[~2007-04-29 16:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-28 21:53 High Resolution Timer DOS matthieu castet
2007-04-28 22:13 ` Thomas Gleixner
2007-04-28 22:37 ` Lee Revell
2007-04-28 22:45 ` William Heimbigner
2007-04-29 7:17 ` Ingo Molnar
2007-04-29 16:08 ` matthieu castet
2007-04-29 16:42 ` Ingo Molnar [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=20070429164230.GA23337@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=rlrevell@joe-job.com \
--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