ExMan 0.5 released

I’ve just released ExMan 0.5. Actually, the code was in git master for quite some time now, but I got around of building RPMs only today. The source tar ball and RPMs are available at the usual Sourceforge.net download space.

Most notable changes are:

  • ExMan now conforms to XDG specification for storing data. Which means, the backend data files is now stored in $HOME/.local/share/data/ExManFile.txt instead of $HOME/.ExManFile.txt. The Qt API QDesktopServices::DataLocation provides platform/operating system agnostic location, so this works fine on GNU/Linux, Windows and MacOS X.
  • The old data file is automatically migrated to the new location so that you don’t have to manually do anything.

The VM bug that delayed Linux-2.6.34-rc4

Arguably, the most complex area in Operating Systems is – memory management. i.e, managing the Virtual Memory (VM).

Linux-2.6.34-rc3 had been out on March 30 and after nearly 2 weeks, -rc4 has not yet appeared.And the reason? Well, we are going to look at it.

The anon_vma scalability patches submitted by Rik Van Riel was merged in the -rc1 phase. Borislav Petkov using -rc3 has hit on a bug causing crash while suspending to disk(hibernate). Linus chimed in suspecting this could be caused by the new scalable anon_vma linking code by Rik. The bug usually appears under severe memory pressure – Borislav explains that the procedure to consistently trigger the bug is to run 3 KVM guests, open firefox and load a huge html file, and try to s2disk – kaboom! Though he himself doubted that this could be a hardware issue since not many people observed it, Linus refused to agree with that because he himself has seen a similar OOPS in the Mac Mini his kids are using. So it is likely a real bug which needed to be identified and fixed. And the anon_vma code is very complex with various levels of locking and RCU usages, Linus wants to simplify mm/rmap.c considerably.

So the bug hunting began by Linus Torvalds and Rik Van Riel, joined by Johannes Wiener, Kosaki Motohiro and Minchan Kim – and every patch being tested by Borislav Petkov. After 10 days of debugging, flying many patches around, {,in}validating various theories, finding and fixing 3 other independent bugs (1, 2, 3) in the VM area (though second one may not be required), Linus came up with a new theory which he explains along with small patch. And, Borislav confirmed that his Netbook just survived more than 20 suspend cycles even under severe memory pressure.

Had the bug not been isolated and fixed, Linus was planning to revert the whole anon_vma scalability patches, which didn’t sound good and that they’d drop their effort to fix it even when feeling so close to fixing it, didn’t sound good either. The whole 4 patches can now be found here – 1, 2, 3, 4. And with that, -rc4 is out in the wild.

Awesome.

Update: The-as-usual-excellent LWN.net article:http://lwn.net/Articles/383162/

ExMan 0.4.5 released!

The new release of ExMan – 0.4.5 – is packed with shiny new features. Source code, RPMs and DEB for Ubuntu can be found at the sf.net project page.

ExMan with formula

Features added in this release are:

  • Support for Formula: I’ve been looking for a simple expression evaluator which could do the purpose. I looked into KOffice source code et al, and they were all complex because they were supposed to handle such complex things. I had a pretty old expression tree evaluator C++ class which I had written when I was in college, but it was literally building a tree of expression and then evaluates it. So I had this option if I couldn’t find anything simpler and cleaner. Thanks to the dvisvgm program which is also part of the LaTeX source code, found a simple expression evaluator implemented as a Recursive Descent Parser (which I guess is the most suitable one for arithmetic expressions), and the credit goes to my friend Deepak Lukose for pointing me to dvisvgm.
    Note: The grammar rules of a recursive descent parser is pretty simple and straight forward, and it is appropriate for the expression evaluation.
    expr: [+|-] term {+|- term}
    term: prim {*|/ prim}
    prim: [ident|number|(expr)]
  • Status Bar: Well, it took me a while to get this incorporated, because the main window of ExMan is not a QMainWindow class, but a QWidget. And there’s no option to drag and drop a QStatusBar in QtCreator. So, just edit the exmanwindow.ui file to add the tag <widget name=”statusBar”/> inside the ExManWindow QWidget. This will make the status bar to appear in the ui design section of QtCreator, and then it can be arranged appropriately.
  • What’s Next? I couldn’t find a way to make the QFrame to adjust its size automatically when the parent QWidget is resized, even though the sizePolicy is set to {Preferred, Preferred}.