Linked by Eugenia Loli-Queru on Thu 26th Apr 2007 06:36 UTC, submitted by RJop
Linux Linux Kernel 2.6.21 has been announced. Linus writes: "So the big change during 2.6.21 is all the timer changes to support a tickless system (and even with ticks, more varied time sources). Thanks (when it no longer broke for lots of people ;) go to Thomas Gleixner and Ingo Molnar and a cadre of testers and coders." More info here and here.
Order by: Score:
Features
by SEJeff (3.52) on Thu 26th Apr 2007 06:44 UTC
SEJeff
Member since:
2005-11-05
Fans: 7

One of the bigger features of the 2.6.20 kernel was the kvm virtualization solution. One of the biggest features for 2.6.21 is the tickless kernel. It will improve energy efficiency and battery life among other times.

If you would rather not read through the shortlog, take a look here for a fairly comprehensive and easy to read list of changes:
http://kernelnewbies.org/Linux_2_6_21

Great Release
by kunaldeo (1.57) on Thu 26th Apr 2007 07:41 UTC
kunaldeo
Member since:
2007-04-26
Fans: 0

My favorite changes were, V4linux, bttv cropping support, PS3 USB (this was great)and dynamic kernel command line.

Guys I want to ask about what about OSS is it completely dropped. becuase OSS has got many changes too.

RE: Great Release
by hobgoblin (2.44) on Thu 26th Apr 2007 17:08 UTC in reply to "Great Release"
hobgoblin Member since:
2005-07-06
Fans: 0

dynamic kernel command line?

edit:

never mind, checked kernelnewbies ;)

Edited 2007-04-26 17:09

Tickless?
by murloc (0.5) on Thu 26th Apr 2007 07:52 UTC
murloc
Member since:
2007-03-12
Fans: 0

What is a tickless system?

RE: Tickless?
by flanque (3.48) on Thu 26th Apr 2007 07:55 UTC in reply to "Tickless?"
flanque Member since:
2005-12-15
Fans: 3

You know when you stop your car after a long drive, it "ticks" for a while after whilst it cools down..? Well, some servers were doing that too, so this prevents that now.

Edited 2007-04-26 07:55

RE[2]: Tickless?
by Shannara (1.44) on Thu 26th Apr 2007 15:57 UTC in reply to "RE: Tickless?"
Shannara Member since:
2005-07-06
Fans: 0

Modded up for humor ;)

RE[3]: Tickless?
by Luminair (2.84) on Thu 26th Apr 2007 16:11 UTC in reply to "RE[2]: Tickless?"
Luminair Member since:
2007-03-30
Fans: 1

This isn't Slashdot. In my opinion we should continue to keep the OSnews comments filled with intelligent on-topic conversation. That means no stupid joke posts.

RE[4]: Tickless?
by Shannara (1.44) on Thu 26th Apr 2007 18:01 UTC in reply to "RE[3]: Tickless?"
Shannara Member since:
2005-07-06
Fans: 0

Opinions mean nothing when the mods of OSNews constantly allow such one liner jokes on all of their news stories. Sorry, but that's how it is here.

RE: Tickless?
by timl (2.25) on Thu 26th Apr 2007 08:23 UTC in reply to "Tickless?"
timl Member since:
2005-12-06
Fans: 0

As far as I understand it (but please bear in mind I'm no expert), tickless means that the kernel will not necessarily wake up periodically anymore.

Originally, a timer was programmed to generate an interrupt ("timer tick") a fixed number of times per second, usually in the range of 100-1000 Hz. That also meant the processor would possibly wake from sleep that many times per second, causing unnecessary power consumption on a lightly loaded system.

A tickless system might disable the timer interrupt altogether when entering an idle state, so it will only wake up when an I/O device demands the attention of the kernel. Of course it would be re-enabled again as soon as multiple processes are competing for processor resources.

If anyone has corrections to the information stated above, please don't hesitate to post them. I'm curious about the exact implications as well.

RE[2]: Tickless?
by Ford Prefect (3.44) on Thu 26th Apr 2007 17:10 UTC in reply to "RE: Tickless?"
Ford Prefect Member since:
2006-01-16
Fans: 6

Well some part is missing. There are processes that want to be woken up after X milliseconds.

So the system has also to make sure to wake up at the next of these events.

A reasonable solution would be to disable the timer interrupt only of no process waits for a timing event, but if so, change the interrupt's frequency according to it.

It is explained here: http://kernelnewbies.org/Linux_2_6_21#head-8547911895fda9cdff32a947...

Edited 2007-04-26 17:14

RE: Tickless?
by haugland (1.48) on Thu 26th Apr 2007 08:27 UTC in reply to "Tickless?"
haugland Member since:
2005-07-07
Fans: 0

I haven't studied the tickless kernel, but I ASSUME that this explains the basics:

Normally the kernel is issuing an interrupt every X milliseconds in order to preempt processes. These interrupts are (normally?) fired at a constant rate. These ticks can influence the power states, and make the CPU etc. change to a more active power state even though no preemption is needed.

The tickless kernel will not fire new clock-interrupts unless there are active processes and a need for preemption. The tickless kernel will only wait for external interrupts when all processes are idle.

RE: Tickless?
by SEJeff (3.52) on Thu 26th Apr 2007 18:51 UTC in reply to "Tickless?"
SEJeff Member since:
2005-11-05
Fans: 7

This isn't exactly how it works because I don't know the number of times / second the kernel wakes up, but it is something like this...

Before:
1000 times / second, the kernel will wakeup and say, "Is there anything for me to do?" Each wakeup is called a 'tick'. If there is nothing for it to do, it goes back to sleep. This wastes energy and cpu power.

Now:
Instead of polling every so often the kernel will only wakeup when there is actually something to do. Once more drivers are taking advantage of the tickless feature in the kernel, there will be less wakeups and less power used. This will be a *huge* gain in powersavings and battery life on laptops. It will also help with virtualization by speeding up virtualized guests.

Does that help any?

RE[2]: Tickless?
by butters (7.08) on Thu 26th Apr 2007 21:04 UTC in reply to "RE: Tickless?"
butters Member since:
2005-07-08
Fans: 34

The phoronix test (a very, very simplistic test) suggests the the power savings is very small, but it's measurable. I'd like to see a testcase that shows a significant (i.e. >10%) decrease in idle power consumption. My guess is that tickless will have a greater impact on virtualization performance than on power consumption. In any case, it's a smart enhancement that should provide advantages without regressions, but the scale of these benefits remains to be seen.

We'll see: still improvements missing
by renox (2.72) on Fri 27th Apr 2007 05:42 UTC in reply to "RE[2]: Tickless?"
renox Member since:
2005-07-06
Fans: 1

AFAIK
1) currently even with tickless, the CPU doesn't enter low power mode, when this will be added the power consumption should be lower.

2) if there are two event scheduled at nearly the same time, it would be interesting to regroup the scheduling of those events, this is planned also.

3) some userspace applications may have to be modified to avoid useless polling (I think a Python library used to do lot of polling).

So there's still quite some work to do, still will the power consumption be really lower? I don't know..

new wifi stack?
by REMF (2.56) on Thu 26th Apr 2007 08:42 UTC
REMF
Member since:
2006-02-05
Fans: 0

is 2.6.21 the kernel that finally integrates the new wifi stack?

RE: new wifi stack?
by B. Janssen (3.6) on Thu 26th Apr 2007 08:49 UTC in reply to "new wifi stack?"
B. Janssen Member since:
2006-10-11
Fans: 2

No, like the linked article said, this is something that will be in one of the future kernels.

Any benchmarks?
by siki_miki (2.4) on Thu 26th Apr 2007 08:56 UTC
siki_miki
Member since:
2006-01-17
Fans: 0

I'm interested to find out how much battery 'performance' is improved with this kernel. Likely I'll install it in Feisty (and unfortunately loose new mac80211 bcm43xx driver that they pathched in, unless I do it myself).

Other important side is userspace. If HAL or any other daemon (or GNOME/KDE component, and even programs like web browser) polls something all the time, than of course CPU will not be idling that often (plus the additional overhead of frequent switching from/to powersave mode). Seriously, Linux still doesn't match battery consumption of a 5+ years old Windows XP, I hope this kernel will change it (along with optimization of userspace stuff).

RE: Any benchmarks?
by czubin (3.12) on Thu 26th Apr 2007 10:39 UTC in reply to "Any benchmarks?"
czubin Member since:
2005-12-31
Fans: 1

Perhaps this "benchmark" is worth something to you:

http://www.phoronix.com/scan.php?page=article&item=651&num=...

RE[2]: Any benchmarks?
by diegocg (4.96) on Thu 26th Apr 2007 13:21 UTC in reply to "RE: Any benchmarks?"
diegocg Member since:
2005-07-08
Fans: 4

Notice that while 2.6.21 is tickless, it doesn't use the CPU power saving modes when going tickless. In the future, when the kernel enters in tickless mode, the cpu power saving modes will be used, allowing to save more power

RE: Any benchmarks?
by biteydog (2.12) on Thu 26th Apr 2007 16:20 UTC in reply to "Any benchmarks?"
biteydog Member since:
2005-10-06
Fans: 1

Seriously, Linux still doesn't match battery consumption of a 5+ years old Windows XP

Doesn't accord with my laptop experience - my "runtimes" were (freshly charged to total cutout):

XP - 2hrs 37mins
Xubuntu 6.06 - 3hrs 49mins

Odd one, that. Can't retest because that was before I completely killed my battery with overwork ;)

My main interest in a "tickless" kernel is for audio work - the kernel clock has fairly recently been changed from 1000hz to 250hz, and this blows out apps such as "Rosegarden", which has to be run on a specially compiled kernel. Even most of then low-latency audio kernels miss this trick - AFAIK only the 64studio distro has a low-latency 1000hz kernel. My hope is that if the clock is "off" when idle the kernel developers will turn it up to 1000hz again when it is going.

RE[2]: Any benchmarks?
by nalf38 (1.28) on Thu 26th Apr 2007 20:05 UTC in reply to "RE: Any benchmarks?"
nalf38 Member since:
2006-09-01
Fans: 0

Biteydog--- I do highly recommend rolling your own kernel for audio work. I was a complete newbie a few years ago and compiling my kernel was a daunting task, but it's actually pretty easy after the first couple tries. I guess what I mean to say is that changing the HZ setting from 250 back to 1000HZ is pretty easy (literally, the press of a few buttons) once you know how to roll your own.

RE: Any benchmarks?
by SlackerJack (5.12) on Thu 26th Apr 2007 16:32 UTC in reply to "Any benchmarks?"
SlackerJack Member since:
2005-11-12
Fans: 3

from what I understand HAL doesn't poll but rather listens, this one of the advantages of userspace.

RE: Any benchmarks?
by elsewhere (4.68) on Thu 26th Apr 2007 19:46 UTC in reply to "Any benchmarks?"
elsewhere Member since:
2005-07-13
Fans: 16

I'm interested to find out how much battery 'performance' is improved with this kernel. Likely I'll install it in Feisty (and unfortunately loose new mac80211 bcm43xx driver that they pathched in, unless I do it myself).


Larry Finger maintains a cumulative patchset for released kernels with the latest wireless-dev stuff, it will cleanly apply to 2.6.21 if you want mac80211 and are going to roll your own anyways.

ftp://lwfinger.dynalias.org/patches/

There were some substantial improvements to the softmac bcm43xx drivers in 2.6.21. I can actually use my 4311 now without jumping through hoops; mac80211 is still a WIP, doesn't work well for all the chipsets yet. But still, it's nice to no longer curse my wifi or fiddle with ndiswrapper. With the latest development the bcm43xx team is doing, broadcom is becoming one of the better supported chipsets in the kernel... that speaks volumes to the work they've done... ;)

v Pimple-faced Linuks nerds
by edwardyawn (-3.16) on Thu 26th Apr 2007 12:34 UTC
RE: Pimple-faced Linuks nerds
by yanik (3) on Thu 26th Apr 2007 12:42 UTC in reply to "Pimple-faced Linuks nerds"
yanik Member since:
2005-07-13
Fans: 0

nice try

RE[2]: Pimple-faced Linuks nerds
by Laurence (4.36) on Thu 26th Apr 2007 12:58 UTC in reply to "RE: Pimple-faced Linuks nerds"
Laurence Member since:
2007-03-26
Fans: 3

Whatever happened to the smarter windups and the 'artistry' a troll would employ to bait his victims?
Trolls these days are just frigging lazy.

RE[2]: Pimple-faced Linuks nerds
by Tweek (1.6) on Fri 27th Apr 2007 02:55 UTC in reply to "Pimple-faced Linuks nerds"
Tweek Member since:
2006-01-12
Fans: 0

It is nice to have a captain of industry such as yourself add your insightful comments to the discussion

v Definition of "troll"
by edwardyawn (-3.16) on Thu 26th Apr 2007 13:13 UTC
v RE: Definition of "troll"
by biteydog (2.12) on Thu 26th Apr 2007 16:30 UTC in reply to "Definition of "troll""
Audio
by thecwin (4.08) on Thu 26th Apr 2007 16:02 UTC
thecwin
Member since:
2006-01-04
Fans: 0

Could this improve audio quality? As I understand it, sometimes the kernel waking up repeatedly can cause fuzzier audio (due to the power surges), and infact, I have noticed a difference changing between 1000Hz and 100Hz in audio quality. Additionally, running a program that consumes all CPU can increase audio quality.

I assume if you used a large buffer and tickless kernel, audio quality could be better.

RE: Audio
by Ford Prefect (3.44) on Thu 26th Apr 2007 17:15 UTC in reply to "Audio"
Ford Prefect Member since:
2006-01-16
Fans: 6

The only good solution for your problem is to:

a) use a good soundcard
b) use symmetric or optical out

RE[2]: Audio
by FunkyELF (3.08) on Thu 26th Apr 2007 19:11 UTC in reply to "RE: Audio"
FunkyELF Member since:
2006-07-26
Fans: 0

Agreed. Use spdif.

I bought a card with spdif five years ago just for that purpose because I had my computer hooked up to my receiver and had a horrible hum on it.

I could fix some of the hum by taking a wire and sticking it in the ground plug of a power outlet and touching the other end to the back of the receiver, but it didn't fix it completely.

That is the one good thing about sending digital signals. You can even use crappy wire to some extent (If you get the signal, it'll be perfect).

RE[3]: Audio
by butters (7.08) on Thu 26th Apr 2007 21:12 UTC in reply to "RE[2]: Audio"
butters Member since:
2005-07-08
Fans: 34

Right. I see so many people buying $200 sound cards (and higher) and just using the SPDIF outputs. The value of these high-end cards is the quality of their analog outputs. If your motherboard has an SPDIF output onboard, then that's all you need, even if you'll be hooking it to professional studio monitors or a Bose home theater system. That's the beauty of digital media.

RE[2]: Audio
by thecwin (4.08) on Fri 27th Apr 2007 16:25 UTC in reply to "RE: Audio"
thecwin Member since:
2006-01-04
Fans: 0

Oh, yes, of course. The solution that I was talking about was an "acceptable" solution, given the machine in question was a laptop. They tend to have sound shielding issues and such.

RE[3]: Audio
by Ford Prefect (3.44) on Fri 27th Apr 2007 16:33 UTC in reply to "RE[2]: Audio"
Ford Prefect Member since:
2006-01-16
Fans: 6

you can operate on battery ;-)

you can also try out to use some DI Unit then (if plugging off the power connector helps, those will help, too), if you don't want to buy a USB soundcard or D/A:

http://en.wikipedia.org/wiki/DI_unit

There are such units for your purpose, too. they work the same but don't have XLR connectors ;)

Magnificent!
by Supreme Dragon (1.16) on Thu 26th Apr 2007 16:23 UTC
Supreme Dragon
Member since:
2007-03-04
Fans: 0

New linux Kernel + KDE 4 = Marketshare gains

Interesting
by Xaero_Vincent (3.32) on Thu 26th Apr 2007 18:14 UTC
Xaero_Vincent
Member since:
2006-08-18
Fans: 2

So what was the timers for?

To interupt the kernel's process schedular and then CPU when Linux wants to perform a context switch between multiple running processes?

Is it used for interupting the kernel when an I/O device device wants the CPUs attention? If so, how is an idle system returned from standby when interrupt ticks are disabled?

RE: Interesting
by smitty (3.96) on Thu 26th Apr 2007 19:08 UTC in reply to "Interesting"
smitty Member since:
2005-10-13
Fans: 0

Yes - when processes are running the timer would go off 1000 times a second and the scheduler would then decide if it wanted to switch to another process. I believe this still happens, with the difference that when the kernel is in the idle loop and not running any processes the timer no longer fires.

When an I/O device wants attention it just creates an interrupt (not a timer interrupt), which hasn't changed from before.

Edited 2007-04-26 19:13

RE: Interesting
by butters (7.08) on Thu 26th Apr 2007 21:31 UTC in reply to "Interesting"
butters Member since:
2005-07-08
Fans: 34

When a CPU is running the idle task (basically just sleeping) and is in tickless mode, the only events that can wake up the CPU is a hardware interrupt. This doesn't necessarily mean an I/O interrupt. For example, on an SMP system, an idle CPU might be woken up because the scheduler (called by an active CPU) rebalanced the runqueues, and there is now work for the previously idle CPU.

Note that tickless currently doesn't use the CPU's low-power states when idle, but it will in the future. Also note that on most current multi-core CPUs, the cores are on the same power management plane, so even if one core is idle, it will run at the same power level as an active core. Future CPUs will have independent power planes for each core.

If we really want to get serious about power management on Linux, then we need to get behind LinuxBIOS and push hard on chipset and motherboard vendors.

Quick note about dynticks
by abraxas (2.44) on Fri 27th Apr 2007 01:38 UTC
abraxas
Member since:
2005-07-07
Fans: 0

Save yourself the trouble of looking for the option in your kernel config if you are using a 64-bit architecture. I was so excited about this feature finally being merged that I didn't read the fine print but apparently dynticks is only available on x86 for now. I guess I'm going to have to wait until 2.6.22, hopefully devicescape will be in by then too.