Random Walk of Life

Stuck with the mistake

Posted in Views, geek, linux by ego on April 30th, 2008

It’s been some time since I last posted something. Had been busy gathering data for the OLS paper and once that was done, got some time to look into the couple of months old CPU-Hotplug issue. There are some more items to be done there, hopefully will get some free time this month.

Read this post earlier today:
http://contentconsumer.wordpress.com/2008/04/27/is-ubuntu-useable-enough-for-my-girlfriend/

How easily people can confuse monopoly with standards.

When someone says Linux is not user friendly, I ask “Compared to what?” and they say “Windows”. My question is, what if someone who has worked on Linux all his life was shown a windows box? How will he/she feel about it?

Given the fact that number of schools today, in the name of “Computer Education” bias the young and impressionable minds by teaching them the basics of Microsoft this-or-that product and tell them, “Children, Windows is an operating system. Operating system is windows”, how justified are we in blaming everything to be a problem with Linux? I agree, there are a number of issues that can be improved in Linux. Whether it is the kernel, or the applications, there’s always that scope. But accusing that “Linux is bad because it does not behave like windows” is a stupid thing to do.

To give you an example, I have a young nephew who is not that much exposed to computers. His only knowledge of a computer is restricted to “Computer has a monitor, a processing unit, a keyboard and mouse”.

The last time he came home, I was working on my home PC which has Fedora 8 on it. He wanted to see how the “Computer” works. I showed him a couple of things. Simple things such How to use the calculator with different base systems, use Firefox to browse the internet, what games are available. And yes, I showed him Compiz Fusion. He spent the rest of the time browsing through my pictures and videos. Didn’t call me for help. Not even once.

Next time I met him, he told me about this “computer with a My Computer on the desktop” that his friend had. He told me how stupid was this browser with no tabbed features on it. How everytime he wanted to do something, it asked him thousand times “Are you sure you wanna do this?” and how irritating the whole experience was.

So, that brings me back to the basic question, does it make any sense in comparing two different operating systems, when you are already have a biased opinion in favor of one of them?! How can you expect such a comparison to be objective? Is the way to make Linux operating system a more user friendly one by mimicking what windows does, or by educating people about Linux?

I guess, these are things one needs to understand before doing Experiments on the girlfriend or grandma.

PS: One of my friends wanted to connect her windows laptop to my Hathway modem. When things didn’t work, she insisted on rebooting the modem. On doing that, things started working! Hmm.. must be a Bug Feature. Because on Linux, I just need to set the static IP using my Network Manager! It doesn’t ask me to reboot the modem :)

Tagged with: , ,

Royal Challengers - Mallya’s No.1; Pun Intended

Posted in cricket, experiences by ego on April 19th, 2008

Had been to the inaugural Indian Premier League T20 match today at the Chinnaswamy Stadium Bangalore. The experience was a mixed bag with few highs and lot of lows.

Me and Pradeep reached the stadium at 4:00 PM, though the inaugural ceremony was only starting at 6:00PM. We reasoned out that since there were no seat numbers on our tickets, the best seats would be FCFS. And we wanted to ensure that we get the best seats in our section. And that we did. We got to sit at this place such that line of sight of was perpendicular to the pitch. And to our left side was the Big screen where we could see the proceedings clearly, in case we missed something on the ground.

Kevin, Shuaib and Pooja were just in time for the inaugural ceremony. The atmosphere was electric.

First it was Shankar-Ehsaan-Loy, which enthralled the audience by singing popular bollywood songs. Then came the troupe, I don’t know from where, which did Rope tricks, and all kinds of fantastic things. It was as if an opera was going on in the stadium. That was followed by a spectuacular dislplay of Lasers and Fireworks. And after this, came Ravi Shastri and Sunil Gavaskar introducing the captains of the different Teams. As expected, Sachin Tendulkar got the loudest cheer of all! Half the money’s worth actually :)

Everyone knew that the “Royal Challengers Bangalore” was a test team. And one team which we were hoping to be equally bad was the “Kolkota Knight Riders“. So we had gone expecting a close match. And precisely at that moment Balu joined us. So were were set for an interesting game of cricket, hoping to get the rest of our money’s worth.

But things weren’t as expected at all. Brendon McCullum took the match away from us from the second over by slogging Zaheer Khan for 18 runs. And single handedly ensured that Kolkota team was comfortably placed at 222/3 after 20 overs. He scored 158 not-out in 73 balls with 13 sixes and 10 fours. It was a innings to be watched and cheered, if only it was scored by the batsman of the team you were supporting! When he was on facing, one could very well expect for ball to be sent all over the park. Amongst the bowlers, only Praveen Kumar showed some promise in the initial overs, but he too wasn’t spared in the death.

After the Knight Riders‘ innings, Kevin gave his “vishesh tippani” that the pitch was a flat one, so the target should be gettable. All depended on how the early batsmen approached the game.

So when the Royal Challengers’ opening batsmen took the pitch, they got the loudest cheers. Before they could acknowledge it with some sweet willow music, Ishant sharma bowled a beauty to get Dravid out the first ball of the second over. And since then, the team never recovered. Jaffer looked as though he was trying to prove to the selecters how strong his defence was, how good he was at leaving alone the balls outside the offstump, so that they would consider him for the next test match. It was getting so irritating, that we were praying for him to get out. But that didn’t happen. What was worse was, his partners kept getting out! And all of them playing rash shots, or totally misjudging the line of the ball. It came to a point that one could hear loud cheers when wides were bowled or singles were taken. Because there was nothing else that was there to cheer about. Oh, probably we didn’t understand what the advertisement board meant when it proclaimed “Cheers to Life”. Anyway the second innings was definitely not something which one would expect out of a T20 match.

I was wondering if the Royal Challengers had confused this T20 match for one of Vijay Mallya’s Page-3 Fashion shows! The batsmen came to the pitch, stayed for a very short duration, and went back to the pavilion as if they were models on the ramp. The team ended up scoring an abysmal final total losing all the wickets, thereby giving King Khan and his men their first victory in the T20 championship.

Come to think of it, what was going through Rahul Dravid’s mind when he asked Mallya during the Team selection,
“Mr Mallya, do you want your team to be comprised of Stars or Performers?”

to which Mallya replied
“Performers”.

And Dravid said,
“Then you shall have them”

If these we call these men performers, I am very disappointed to say that the home crowd was expecting a much better performance in the inaugural match, after the spectacular inauguration ceremony. Atleast they could have shown some grit and determination instead of appearing so lost, before actually losing the match.

Mr Mallya, I completely understand that in Formula 1, it’ll take Force India some time before we can expect a Podium Finish. We’re still new to the game.

But that’s not the case when it comes to Cricket. You succeeded in securing the second most expensive franchise in the league and look whom you chose as your players. Or is it that you’re not very much bothered about the team’s performance since you’re think you’ve struck a bargain in getting a platform to promote “High Flying” brands with all those surrogate advertisements splattered all across the stadium?

I remember one of my friends’ quotes from one of our cheap “high flying” sessions at college: “McDowells, as the ad claims, is truly mera No.1. It tastes like piss“. I guess it applies to the Royal Challengers as well. Only this time, it is Mallya’s No.1, which, even he hast to admit, has pissed off a lot of fans.

Scattered Mind

Posted in Views, experiences, reflections by ego on April 5th, 2008

People who know me, know the fact that I like to keep my options open. Simply because it allows the freedom to defer any decision till it really needs to be taken.

However, in the last couple of years, I have observed that this has a common side effect: A totally scattered mind which is trying to multitask between hundreds of things at the same time!

In the process of ensuring that I had my options open, I found myself surrounded with so many options that all the time was spent in hunting for the most favorable one. Irony is that, the same time could have been used to act on one of these hundred options!

Today morning, I read this article titled “Pitching with Purpose” which talks of Focus and Self-Discipline:

“Self-discipline is a form of freedom. Freedom from laziness and lethargy, freedom from expectations and demands of others, freedom from weakness and fear — and doubt.”

All this while I thought of discipline as something that bound you or constrained your natural flow. But this article gives a totally new perspective.

Tagged with: , ,

Cause and Effect

Posted in fundoo, geek, interesting, linux, programming by ego on April 4th, 2008

While working on idle power management, I used vaidy’s klog based patches to profile an idle system to obtain stats such as:

* The time when a cpu enters into the tickless idle mode
* The various interrupts that bring the cpu out of idle state.
* The timers that expire in this interval and cause a wake up.
* The tasks that demand/ or are made to be wake up on the idle cpu.
* The time when the cpu comes out of the tickless idle mode and starts executing the tasks.

While observing the task wakeup instrumentation data, I noticed that the wakeup statistics for kondemand appeared pretty strange. For the uninitiated, kondemand is a kernel thread that belongs to the ondemand governor of cpufreq subsystem, which changes the p-states of the system, based on the utilization statistics. Thus it’s something that helps in power management.

root@llm43 tests]# ps aux | grep kondemand | head -4
root 1143 0.0 0.0 0 0 ? S< 09:21 0:00 [kondemand/0]
root 1145 0.0 0.0 0 0 ? S< 09:21 0:00 [kondemand/1]
root 1146 0.0 0.0 0 0 ? S< 09:21 0:00 [kondemand/2]
root 1147 0.0 0.0 0 0 ? S< 09:21 0:00 [kondemand/3]

From the file wakeups.txt, an output of my profiling experiment,

pid cpu nr_wakeups
————————–
1143 0 468
1145 1 279
1146 2 78
1147 3 68

Couple of things bothered me here.

  1. The unusually high number of wakeups on CPU0 and CPU1. kondemand was wakeing up approximately at the rate of 4 time and 2 times respectively on these cpu’s over a observation idle period of 120 seconds.
  2. The difference in the number of wakeups by kondemand on the different CPUs.

Bewildered, I fired a mail to Venki asking for possible explanations.
And I started looking at the code. Now, the number of times the kondemand thread is supposed to check for a change in the frequency is determined by this sysfs tunable called sampling_rate. It was set to 256000us on my system. Which accounted for the unusually high number of wakeups on the CPUs.

But I was still confused. The sampling_rate is a global tunable which maps to the variable dbs_tuners_ins.sampling rate, which is common to all the kondemand threads. Then why the different wakeup rates on different CPUs?

Venki replied to my original query reminding me that kondemand uses deferrable timers! That explained everything.

Deferrable timers, behave normally on a busy system. But on a idle system, when are about to decide when should we wake up next inorder to service the next timer in the list, we skip any deferrable timer we encounter.Thus, a deferrable timer on an idle cpu would expire when the next nearest *hard* timer would expire.

So, the reason why CPU0 and CPU1 were having such high number of wake ups on an idle system can be accounted to the fact the expiry of some other timer like the ehci_watchdog would trigger the expiry of kondemand timer, and along with it the wakeup of the kondemand thread! And depending on the number of timers that are queued on different CPUs, we have the corresponding number of wakeups of kondemand thread!

So, what I was thinking to be the major cause for wakeups in the kernel, turned out to be an effect of the expiring timers queued by a totally unrelated subsystem, thus confirming the old wisdom of mathematical logic: “If two events occur one after the other, it doesn’t necessarily imply that one is the cause for the other”