Search Results: "will"

19 October 2005

Raphaël Hertzog: Serial overrun on Linux

Working with serial lines can sometimes give you big headaches. I have an embedded PC based on 386 SX 40 processor. This PC doesn’t make much but it has programs using the serial line intensively. Things didn’t work as well as expected so I looked carefully what was going on … the beast was loosing bytes ! My information has been promptly confirmed by the /proc/tty/driver/serial entry. If you have “oe: X” (where X is a positive number) there, it means that one of your UART detected overrun errors. So what’s an overrun ? An overrun happens when the UART receives data while its FIFO buffer is full. Why is the FIFO full ? Because Linux didn’t treat the serial interruption quickly enough. Why is Linux so slow ? Linux is not a real time OS and it doesn’t guarantee any response time to interruption, so Linux is not so slow but my PC really is … what happens is that interruption related to the network are treated before serial interruptions. Furthermore IDE disk interruptions can take too long too. Worst case is of course, you’re treating a disk interruption, then you have to treat the network interruption and only after that you can treat the serial interruption which in fact happened right after the beginning of the disk interruption So fixing serial overrun is a rather complex problem since it’s really a kernel related problem. Googling on the subject I have found several ideas to explore : Using hdparm -u wasn’t enough to solve my problem… so I continued to look for a solution and I found one ! I recompiled my kernel with the low latency patch and the preemptible kernel patch. Those are usually used for multimedia applications where you need good responsiveness in order to deliver content in real-time but the fact is that they do work for my purpose too ! My serial overruns are completely gone at 9600 bauds. However I can still have some when running at 115200 bauds. Moreover I can create serial overrun by running a find / -type f grep -v /proc/ xargs md5sum in the background… I can’t make miracles with this slow processor… if you have more ideas to further improve the situation, I’m willing to try !

Scott James Remnant: Parallel Peer Programming

Here at Canonical Towers we have several staff who worship at the altar of Extreme Programming, and as such many of the methodologies and rituals prescribed by that religion find their way into our day-to-day working practices. A few of these came together in an interesting way a few weeks ago, and it was suggested by a cow-orker that I blog about it so he could give the URL to people. The first ritual is that of the sprint, I don’t think this is orthodox XP but rather something inspired from it that we picked up from the Python community. With all of the Canonical developers scattered across the globe mostly working from their own homes, it’s become a useful tool; particularly for the Launchpad team. The basic idea for those that haven’t heard of it is simple, and perhaps obvious; you get a selection of the team together in one place, sit them around the same table with particular goals to complete. In effect it’s highly compressed facetime and high bandwidth interaction to nail those tasks that need it, before you head off again and work at a more sedate pace. The second is directly from XP doctrine and is that peculiar observance known as pair programming, something that is often coupled with sprints. For anybody who hasn’t encountered this before, it’s something I’ve always found rather odd. You get two programmers together, both itching to code, and you take one of them’s laptop away; and you don’t just force them to fight over the keyboard either, the laptop-less soul isn’t allowed to touch it. The theory here is that it frees the deprived individual of the hassle of coding and allows them to direct the programmer in ways that may not be immediately obbious, or alternately think about the next bit of work that needs doing. Another interesting side-effect is it can be an interesting way to learn code you’ve not worked with before, if you’re the one doing the coding and you’re being guided what to do by a sage who already knows it. I have a funny story here, so I’m going to digress from the main stream for a moment to tell it. A few months ago I was working in the London office, Mark had been up all night coding and had then given me responsibility to get his changes landed onto the Launchpad mainline. I’m not that hot on quite a bit of Launchpad, and fade to utterly clueless the nearer the code gets to the web application itself; and when trying to merge the two there were conflicts which I needed Mark’s help to resolve. Now as anybody who’s met Mark knows, he’s a pretty good example of a Type-A personality, yet he suggested that we do a spot of pair programming to get the code in and I’d be the one with the laptop as it’d help me get to grips with the affected parts. This hilighted something I’ve always seen as a problem with pair programming, dealing with it when the a person with the keyboard has a totally different way of working to you. In particular, I’m an emacs user, whereas Mark is a die-hard vim user; but also right down to the working directory I would work from, how I test results, etc. When you’re the one without the laptop, this can be quite infuriating, as you know exactly how to solve a problem and the idiot with the keyboard is dithering about doing things you don’t understand just to get there. If you’re a Type-A personality, you generally snatch the laptop away at this point and do it yourself; or at least you would, if you could drive the strange editor the other person uses. I swear Mark was sulking as he gave the laptop back and let me do it. Anyway, there is some relevance to that and we’ll come to it in a moment. The third and final methodology is the concept of unit tests and more specifically test driven development. For anyone who hasn’t come across this before, I highly recommend it; I was suspicious too when Robert Collins took it upon himself to teach me the true way, but now I’m sold. Simply the idea is that if you have any code that doesn’t have another piece of code in a test suite that checks that it’s working correctly, that code is broken. More particularly unit testing involves checking just one feature or requirement at a time, and stacking them together to test all of the code paths. I’ve actually found that this improves the APIs I design, as I write the code in small blocks and functions to make them easier to test. Test driven development takes it even further, you write the unit tests first, before you write the code they’re supposed to test; usually one or two at a time. Obviously these tests will fail at first, it’s then your job to write as little code as possible to make them pass. If your code isn’t right, you add a unit test that will fail, and modify the code to make it pass. This really comes into its own when you’re fixing bugs later, once you’ve identified the bug you write a test case or two that cause the problem; these will of course fail. You can then modify the code to make them pass, and at the same time be sure you’ve not broken other functionality because of the existing test suite. I’ve also found it really useful for particularly complicated or tricky pieces of code, especially those intricate algorithms that do particularly heavy lifting. So onto the event itself, this was a sprint in our London office to indoctrinate Gustavo Niemeyer with the various projects he’d be working on. The goal for this sprint was decided to start the conversion of HCT to Bazaar-NG, and to do this Gustavo and I would pair program. Now my last experience of pair programming had been that story with Mark (see, it had some relevance) and I knew I’d be just as bad if I wasn’t allowed to have the keyboard. I was also acutely aware that if Gustavo was just sitting by and watching, he wouldn’t get much benefit from it either, so he needed to be actively involved in the coding so he could learn the things he’d be working on. I came to what I thought was a pretty neat, and obvious, solution to these problems. We set up my laptop with the code we’d be working on, and on my display were two side-by-side terminals both running screen sessions. Gustavo then set up two same-sized terminals on his, ssh’d into my laptop from both of them and joined the screen sessions. In the left-hand one he ran vi, and in the right-hand one I ran emacs. Thus we both had keyboards, and both had editors, yet could see each other working and even steal the keyboard without danger of violence. We didn’t just sit side-by-side and code on different things though, that’s not pair programming and is just ordinary programming with a bit of a voyeuristic twist. What we did was: in my terminal I started writing the test cases for the code we needed, it was Gustavo’s job to write the code that would make them pass. We actually added a third terminal in which we could run the test cases themselves; so I could run them when I’d added something that would fail, and Gustavo could run them when he thought he’d made them pass again. This turned out to be a rather fun way to work, and at one point I was almost able to try and convince myself that the code was writing itself to pass the test cases I was writing. It also got me thinking that it’d be really neat to use genetic algorithms to breed code to pass test cases.

Peter Van Eynde: telenet and proxy errors

My bother had severe problem with telenet (the local cable company) and he actually called the helpdesk while I was with him. I noticed the error they made and so could correct it. Normally they ask you to configure http://pac.telenet.be:8080 as pac file. The pack file is:


/* PAC FILE: VERSION MANAGEMENT WITH CVS
* USE CVSWEB FOR UPDATING !!!
*
* Proxy autoconfig file
*
* $Revision: 1.29 $
* $Date: 2004/04/01 06:58:30 $
*
*/

function FindProxyForURL(url, host)
> <br><br/>
return "DIRECT";
> <br><br/>

Notice that there is no proxy configured. When this did not work they asked to configure proxy.telenet.be:8080 as a proxy without disabling the pac stuff. This also did not work. After the long call on the expensive helpdesk I tried configuring the proxy and disabling the pac. That worked.

Of course as he was using an inferior operating system as a first step he had reinstalled everything, and lost some data he had forgotten to backup.

I wonder when they will fix the pac file...

Peter Van Eynde: Gains and losses

I've removed the hoary and hoary24 sections of the CL package repository I host on p.d.o.
On the other hand I and David D. Smith will adopt the clisp and libsigsegv packages that Will Newton took good care off up until now. We will coordinate the work through the darcs archives on cl-debian.alioth.debian.org.

Benjamin Mako Hill: Ubuntu Talk at BLU

Last night, I decided to check out the Boston Linux Unix webpage to find out when the next meeting would be and what the talk would be on. To my surprise, the talk is tomorrow and is slated to be given by none other than Benjamin Mako Hill. Hmmm. I vaguely remember agreeing to give a talk like this in general sense but don't remember ever agreeing to a specific day. In any case, I'm not one to disappoint and am working on my slides. If you're interested in some post-Breezy action in Boston, please show up! If you can't make it, I'm trying to arrange a proper release party for some point after I receive my Breezy CDs (a week or two I guess). I'm sorry for the short notice. Of course, I'm giving the talk on short notice so I'm not too sorry. Additionally, I am missing both a class and a Media Lab sponsors dinner that I was already double booked for. You should be able to cancel up to one of your prior engagements to attend. Information on the talk is on the BLU website. The talk will be held at MIT in E51-315.

18 October 2005

Sam Hocevar: Taking over libmpeg2

Meuuh and I eventually took over libmpeg2, in a totally friendly way. Our first job will be to review every patch that was submitted in the last 18 months. The biggest work will be, as with libdvdcss, to deal with MPlayer s usual inability to split a patch into functional subsets.

MJ Ray: Central Trains to die

The Department for Transport has announced how it will reshuffle the English midlands railways currently operated by Central Trains, Midland Mainline and Silverlink. There will be east and west midlands railways, with other routes transferred to cross-country (currently Virgin) and possibly Trans-pennine Express and Chiltern. For East Anglia, this means Norwich-Peterborough-beyond will transfer to the new east midlands railway, while Birmingham-Peterborough-Cambridge-Stansted will transfer to an expanded cross-country. This is probably good. Every time I've used the Birmingham service, it's been crowded and slow (but comfortable if you get a seat, at least recently). The cross-country unit runs some InterCity trains, so maybe Stansted might get bigger, faster trains.

Uwe Hermann: I ordered the new video iPod today

Yes, that's right. I have ordered one of those shiny new video iPods today. I was never impressed too much by all this Apple hype going on all around me. In fact, I have never owned any Apple product (no iPod photo nano shuffle * , no powerBook, no iBook, no iMac, no Mac mini). Until now. I simply couldn't resist to replace my 256 MB noname MP3 player with the full-blown 30 GB of the iPod (the 60 GB version costs way too much for my taste). See the specs for more technical details on the new iPod. Apart from the usual iPod features you all know, this one's supposed to be thinner, can display photos and (the major improvement) videos. Yes, it's only 320x240, but it's videos. This thing will initiate a huge video blogging / videocasting wave, and those vlogs will soon become as popular as podcasts are today, I'm sure. I hope to get my hands on that thingy in a bit more than a week (shipping takes a few days, it seems). I already have a lot of things on my mind, which I'm gonna do with it: If you have any suggestions for more geeky things I could be (ab)using it for (think john the ripper on iPod and similar things), don't hesitate to write a comment! Hm, I might port bb to the iPod if nobody beats me to it...

16 October 2005

Erich Schubert: Email address changes

My @berkeley.edu email is no more; my @sims.berkeley.edu will probably run out in spring - I'll continue to be reacheable using my regular email address as well as my debian.org email.

Erich Schubert: Winter term begins

Today winter term will begin at my university. Meaning I'll be really busy. I'll be doing rather many lectures, and my focus will be to get ready for the exams I plan to take in march...

Steinar H. Gunderson: Multi-terabyte arrays

What's a good way of getting a few terabyte of cheap (ie. SATA) disk these days? Our backup box will increase to 3TB in a few days, and after that it's just getting too painful to continue as we do today: 12 300GB disks (400/500GB is a lot more expensive); some older PATA, the rest SATA, all in RAID-5 plus one hotspare and a system disk. It has grown from 240GB two years ago, and if this is going to continue we'll have a real problem in a few years. I read about this unusually cheap SATA SAN from IBM the other day, and it was $5k even without disks... way outside our league. :-) Of course, disk is going to be even cheaper then, so 500GB disks will be viable, but we'll still be needing too many disks to fit in one internal rack-mounted case. We don't need extreme performance or hardware RAID; all we want is raw block devices we can access from Linux and use for a few RAID-5 devices we can LVM together.

Matthew Palmer: Why Ubuntu Loves dpatch

Joey, I strongly suspect that the reason that Ubuntu loves converting packages to use dpatch is because the version control tools that are being built in their secret workshops will be aimed around keeping patches separate, and it's reasonable to assume that Ubuntu will be heavily supporting the Wig-and-Pen dpkg source format, considering the originators of the format (and the fact that it looks like pretty decent technology).

Matthew Palmer: Nokia 3120 with Gnokii

Holy $DEITY! A technical post! So, I've finally broken down and gotten a USB data cable for my Nokia 3120, after a brief scare where I thought I'd lost the phone (along with the voluminous phonebook therein), and a desire to see if I could get a bit of GPRS narrowband data love happening. Not wanting to boot the 4GB virus, I turned to gnokii for help. I got it working, but it was a bit of a trial. The first thing to consider is the cable. As far as I can tell, a lot of phones aren't really capable of talking USB directly to the PC -- they're wired for (presumably) RS-232 (or some other primitive serial protocol). So, the USB cable that you get will quite possibly have a USB-to-serial chip built in to it. The popular DKU-5 cable supposedly has a pl2303 chip in it (supported by the module of the same name), but the "current model" cable is the CA-42, which has a chip supported instead by the cdc_acm module in Linux 2.6 (2.6.10, at least, which is what I'm running). I've got the CA-42 cable, so these instructions are based on that, but I'm led to believe that the DKU-5 is somewhat similar. A side-effect of having hardware in the cable itself is that the cable is detected as soon as you plug it in to the computer, even if there's no phone connected. This weirded me out for a bit, but is nothing to worry about. So, you plug in the cable, and it should be autodetected. The dmesg command will tell you exactly what went on. The cdc_acm module should create a ttyACM0 (or ttyACMN, anyway) device node for you in /dev. Remember this -- you'll be seeing this material again. So now the time comes to play with Gnokii. I installed the version from Ubuntu Hoary, which I'm running on my desktop, but quickly gave that away as Google told me that much better support was to be had in newer versions (0.6.8 being the latest and greatest). I was persuaded, and whipped up a quick backport from the current Debian sid package. Next, we configure Gnokii. Despite having plenty of comments, the example config file is a little short on useful tips for a complete ph0ne n00b like me, but after a fair bit of trial and error, I got things sorted out. Relevant settings in my ~/.gnokiirc:
port = /dev/ttyACM0
model = 3120
connection = dlr3p
That's pretty short configuration-wise, but let me tell you it was a trial to get those two settings sorted out. To take the third setting first, the connection setting is more than a bit weird. The default is serial, which I suspect is only for rooly trooly 9-pin D-connector serial ports -- not pseudo-serial USB cables. There is a huge comment block above this setting in the config file, and none of it made the slightest sense to me, so I just played until I got it right. I suspect that dlr3p is the setting to use for all USB cables, but I can't be sure. The second setting (model = 3120) won't actually work unless you patch your Gnokii with the patch I just submitted to Debian. (Presumably this patch will end up in Gnokii upstream at some stage). It's a fairly trivial patch. Practically, I think you could put another compatible model number (like 5140) in the config file and it'd work OK, but I'm a neat sort of person. The port setting is a simple derivation from the device file created when the USB cable was plugged in. If you're using a DKU-5 cable, I think you'll need /dev/ttyUSB0 instead.

Axel Beckert: Berlinux and Linux-Info-Tag Dresden

Like alphascorpii, I’ll be at Berlinux in Berlin next weekend as well as at Linux-Info-Tag in Dresden the following weekend. At both events I’ll present the Website Meta Language (WML) in a talk (similar to the WML talk I held at Oscomtag 2005, only more detailed) and in Dresden I’ll also hold a workshop about understanding and efficiently using command line shells (based on the Shell Efficiency talk at DaLUG last month). It will be focused a little bit more on shell beginners and intermediate users than on shell cracks. At Linux-Info-Tag they should better have a look at Sven Guckes’ zsh workshop. After Dresden, I’ll be on holiday for a week.

Next.

Previous.