Search Results: "matthew"

10 June 2007

Matthew Garrett

Modern Intel SATA chipsets (anything from the ICH6m onwards) can be driven in two modes - one that looks awfully like an old-fashioned PATA controller, and one that conforms to the AHCI specification. Windows deals badly with AHCI, so BIOS authors tend to program them to PIIX mode. Some BIOSes have an option to let you choose which is used, but most don't so you end up stuck with PIIX mode.

This is a bit of a shame, since AHCI supports functionality that isn't really present in PIIX mode. For laptop users, one of the more interesting features is AHCI's link-level power saving. At the cost of some performance, it's possible to save 0.5W or so. There are patches beginning to appear for this, but it's no help to people stuck with PIIX support. Over the past couple of days I've been looking into what's necessary to reprogram the chipset into AHCI mode. The biggest issue is finding some MMIO space for the AHCI registers. Most BIOS authors don't program the AHCI base address register, which means trying to find some spare address space to map it. I've hacked support for this into the PCI layer and added a quirk that attempts to reprogram chips into AHCI mode. It's not really ready for proper use yet, but it'd be good to get some amount of testing to see if there are obvious issues. The code is here and ought to apply to current git. Obviously, you'll need ahci support in your kernel.

9 June 2007

Matthew Palmer: Good DNS Hygiene

How sure are you that the DNS infrastructure for your domains is in good health? Are they all properly delegated to the right place, with correct NS records and glue? Are all of the domains that you rely on to get your names resolved properly configured themselves? Although everyone out there is probably saying "pfft, of course!", don't be so sure. Before you assume the best, try running one or two of your domains through Squishywishywoo's DNS checker, which does a recursive query for the given record from the root servers all the way down, giving you complete information on what's being checked and what the results are. From that report, you can easily work out what's wrong with your DNS lookups, and correct the problem at it's source. It's also handy for seeing exactly how a DNS lookup works (and explaining to random nitwits how DNS queries actually work). It's actually interesting to run a few domains (run by people who should know better) through the checker and see what actually happens. There's a surprisingly large amount of breakage in people's DNS setups. So the next time you find someone's website is slow to load, perhaps run their FQDN through this DNS checker and see if it's their server or their DNS lookups that is slowing things down.

Matthew Palmer: Project Honeypot: The Joining

After asking last week if anyone had any experience with Project Honeypot, I got one response, from Chris Samuel, who was pretty positive about the whole thing:
I'm one of the people contributing, from the stats on my site it appears I've contributed to the identification of 6 harvesters and a comment spammer. I'm only running it on one site at the moment, but it seems to be a useful service and once it's up and running it seems fairly inconspicuous.
I decided to give it a go myself, and signed up. It's pretty nifty the way it all works. You can do a number of different things to be part of the project, from linking to other people's honeypots (through the trivial act of adding some HTML to your web pages), or you can setup a honeypot of your own (which is done in an ingenious manner, and just requires you to be able to run one of a bunch of different forms of dynamic script -- about ten minutes work, tops). You can also contribute a domain (or subdomain) which the project will use as a spamtrap domain -- all you have to do there is add an MX record. The use of lots of different domains makes it harder for spammers to filter known spamtrap domains out of their lists. In exchange you get good karma from helping to identify network abusers, and you can monitor chunks of IP space (such as space that your company sub-leases to others, for example) for evidence of abuse, or use the collected data to block abusers from your own web servers through the project's http:BL service. The http:BL, for me, is probably the most valuable "payback". It lists IP addresses that have been used recently by comment spammers, address harvesters, and other abusers of HTTP resources. It's not a list of spam sources, though -- there's no shortage of DNSBLs for that. The project has an Apache module that can query the list and re-route or block requests from those IP addresses, and there's also a Wordpress plugin that queries the list (not that I use Wordpress, but it's an example of what can be done). Unlike Chris, I haven't helped to identify any bad activity yet, but there's been some activity on my honeypot, so I'm hoping that I'll catch someone soon. I think it's worth getting involved and contributing what you can -- there's very little cost involved (I got all my resources setup inside of an hour, and I haven't noticed any increased load on my server or bandwidth), and everyone wants to stop Internet abuse. So please, take a look at the project and consider joining.

7 June 2007

Matthew Palmer: For Your General Good Health...

Read Limes & Lycopene, the regularly updated blog of nutritionist Kathryn Elliott. It regularly has interesting and healthy recipes, discussions of current food-related news and fads, and Kathryn has recently started up "Q & A Thursday", where you can ask questions throughout the week and get a big dump of interesting answers each Thursday. My favourite from today's burst is "What should your dinner plate look like?" (apart from flat and round, of course...) In the recipe arena, I can't recommend the Pumpkin and Cinnamon Ristto highly enough -- it is absolutely delicious.

6 June 2007

Matthew Garrett

It seems that I've maligned IBM entirely unfairly. They just forwarded me photographs of how my Thinkpad arrived there.

Perhaps using shipping companies named after explosives isn't such a hot idea.

4 June 2007

Ian Murdock: On community bootstrapping

Matthew Garrett: “[I]f you create procedures before you create community, the people who end up enforcing the procedures tend to be the sort of people who find enforcing procedures to be the interesting part of the job rather than the ones who see them as necessary evils to enforce moderately sensible community development.”

3 June 2007

Matthew Palmer: Perhaps It Wasn't The Marketing...

It is common wisdom that one of the major reasons that Microsoft has prevailed in the software industry is because it is supremely good at marketing it's products. After watching a Windows 386 promotional video, I'm starting to doubt the validity of that wisdom. To paraphrase Mr. Burns, "Smithers, I'm beginning to think that Microsoft is not the brilliant marketing machine I thought it was".

Matthew Palmer: OfflineIMAP and Deleting Folders

(File this under "Reminders for the future Matt") I use, and highly recommend, OfflineIMAP for the synchronisation of your e-mail between your daily working machine and your IMAP server (if you don't have an IMAP server available for your mail, it's high time you got one). You point it at an IMAP server somewhere far, far away, and a local Maildir, and all of your mail and folders magically get synchronised in both directions. New folder on the server? After the next run, it'll be on your local machine. Even more magical, though, is that any new mail or folders you create on your local machine will be uploaded to the server. Woohoo! Offsite Backups! (Before you GUI mail users say "pfft, my client does that all for me", I'll remind you that I don't need to chew several hundred megs of core to delete my spam) I've got some magical procmail rules (specifically, look for "ARTFUL PROCMAIL") that automatically filter list e-mail into individual folders (with automatic creation of the folder if necessary, of course). This makes mailing lists soooo much easier to handle. Of course, when I unsubscribe from the list a couple of weeks later, that folder is still sitting there, empty and forlorn. I don't mind empty directories, except that they slow down the OfflineIMAP sync run, since it asks "any new mail in here?" for every one of them. I'd just delete them from my local machine periodically, except that OfflineIMAP can't delete folders off the server if you remove them from your local Maildir (and vice versa). Instead, the folder gets re-created on the local machine, which is definitely not the result I'm looking for. I'm pretty sure this is an IMAP limitation, so I'm not criticising John Goerzen for not implementing this particular feature. However, the empty folders bother me a bit, so I decided to do something about it. Namely, I hacked up some little shell one-liners. These one-liners are all dependant on you having the same IMAP server (Courier) and folder name mapping (none) as me, otherwise there's a good chance that your file names won't match the patterns I've used. For reference, My folders on the server are dot-directories under $HOME/Maildir, and my folders all start with INBOX. on the client. Also, both sides use periods to separate folder levels. As an example, e-mail to the debian-devel-announce list gets stored in $HOME/Maildir/.lists.debian-devel-announce on the server, and $HOME/Maildir/INBOX.lists.debian-devel-announce on the client. I've got one big before you start warning: this process involves deleting things. If you're not able to verify that what these snippets are doing is correct for your particular situation, then please do not run them. Also, if running them causes all your e-mail to disappear or your cat to fall pregnant (despite being spayed and/or male), then that isn't my fault. The only warranty I give is that It Works For Me. It May Not Work For You. As a first step, make sure that your local and remote mail stores are in sync -- presumably by running OfflineIMAP. Otherwise, a folder which is empty on one side might not be quite-so-empty on the other side, and that would possibly make for sadness. Stopping e-mail from coming into your mailboxes would be good, too -- I just turned off my MTA for a few minutes, because clogging other people's queues is fun. Doing something smart with procmail would also work. On the OfflineIMAP client machine (laptop, home desktop, whatever), cd into your local mail store, and run this to generate a list of IMAP folders that don't have anything in them:
 for i in INBOX.*; do find $i -type f   grep -q $i   \
 (echo $i   sed 's/^INBOX//'); done >/tmp/empties
The contents of /tmp/empties should look something like:
 .Deleted
 .junk
 .lists.debian-devel-announce
 .lists.something-funny
 .spam
Review the list of folders it produced (just to make sure nothing really unpleasant ended up in the list), and then run:
 for i in $(cat /tmp/empties); do rm -rf INBOX$i; done
to delete all the empty folders. Next, copy the list of folders onto the IMAP server (yes, you need shell access on the server to do all of this; that's why I run a Linode), cd into your Maildir on the server, and run this:
 rm -rf $(cat /tmp/empties)
That removes the folders from the server as well. For some reason, OfflineIMAP doesn't notice that a folder has gone away, and so it doesn't remove the metadata for the deleted folders from it's cache. I'm not sure if that hurts performance or is otherwise injurious to your health. To be ultra-neat, go into $HOME/.offlineimap (or wherever your metadata dir is) on the client machine and run
 for i in $(cat /tmp/empties); do find . -name INBOX$ i ; done  xargs rm -rf
And that makes everything clean and tidy. Now, of course, someone's going to point me to a small script that finds all of your local empty folders and deletes them locally then issues an IMAP "delete folder" command on the server. But I had fun working all this out, so it's not a complete waste.

Matthew Palmer: Project Honeypot

Recently I stumbled across Project Honeypot, an interesting anti-spam system to identify and flag Internet abusers, through the use of honey pots -- systems that look innocent and attractive enough to the passing network abuser, but which actually log and flag the abuser's activity and record it for future reference. It seems cool enough -- anything that aims to stop random assholes from abusing the Internet and making life unpleasant for the rest of us is to be commended -- but I'm wondering if anyone has had any experience with the project, and has any comments? I'm considering joining up and contributing a few resources, but prior experience is always worth listening to. E-mail me at mpalmer@hezmatt.org, and I'll summarise in a future post (possibly with my own experiences, if I do actually join up).

Matthew Palmer: Get Your War On

I've got a number of web comics in my rotation, which I read with varying regularity. I don't know if I'd call "Get Your War On" one of my "favourites" (if only because I don't think it should need to exist), but it does have some viciously biting commentary on the Iraq war. Some of the ones I wish I had on T-shirts: Culturally Sensitive @ Get Your War On Shiite Death Squad Productivity @ Get Your War On The Power of Freedom @ Get Your War On The Writ of Habeus Corpus @ Get Your War On

1 June 2007

Matthew Garrett: Further stories of customer service despair

Orange have a fairly decent offer for "unlimited" (1GB a month or so) 3G access. I'm a pay monthly customer on an old tariff that's no longer offered, but there's no mention of any sort of limitations there and they seemed happy to add 3G access to my account. Cue two days of repeated phone calls trying to find out why my entirely 3G phone was refusing to connect to their 3G network. After going through being told it was my phone settings, poor reception, something that I could get fixed at my local Orange store or that it was because they'd entered the wrong start date(!), I finally got through to someone who was actually genuinely friendly and helpful and told that I needed a 3G sim[1]. Oh, and that they wouldn't provide me with one because of the tariff I'm on.

Fucking useless telco.

[1] Something that's clearly documented on their website. Oh, wait.

Matthew Garrett

Dear IBM,

I appreciate that laptops are awkward to disassemble, something that's even more true of ultraportables. As a result I don't feel especially surprised that you managed to make a hole in my laptop while working on the screen, and I appreciate your offer to reexamine the hardware. What I appreciate less is your requirement that I pay for it to be sent to Scotland for another fortnight so that you can correct your mistake, you cretins.

No love,

Matthew

Matthew Garrett

This thread on the Sun initiative to produce a more Linux-like distribution of OpenSolaris is interesting not so much for the technical goals, but as an insight into the community. The immediate response to the proposal? A set of complaints that it hasn't followed the correct process.

Now, to be fair, there have been other threads discussing the technical and social desirability of such a distribution already and some are still ongoing - it's not like the OpenSolaris community has ignored it entirely in favour of process fetishising. However, it's indicative of a community that's more concerned with procedure than it is with producing high quality software. What I suspect has happened is that Sun felt it was important to ensure that procedures were put in place before creating a community in order to avoid the problem of it immediately turning into low-grade anarchy. The problem with this is that if you create procedures before you create community, the people who end up enforcing the procedures tend to be the sort of people who find enforcing procedures to be the interesting part of the job rather than the ones who see them as necessary evils to enforce moderately sensible community development.

Sun's clearly stuck between a rock and a hard place here. They don't want to be seen to be directing the community too strongly, or they'd end up like Red Hat did with Fedora - you alienate your community by giving them the impression that they have no influence over the direction of the distribution. On the other hand, the rapid growth of the Ubuntu community strongly suggests that having a strong leader can ensure that people don't get too bogged down in procedure at the cost of technical progress.

I suspect that Sun made the wrong call here. Having more corporate influence to begin with might have put off some contributors, but it would also have allowed the development of a functional community at an earlier stage. Sun could then gradually withdraw (as Red Hat have been doing with Fedora) and let the community play a larger role. Perhaps that way we'd hear more about the technical contributions coming out of OpenSolaris and they wouldn't be left with just the same two cards they've been playing for a couple of years now - dtrace and ZFS.

On something of a tangent, I don't think their choice of license has helped a great deal here. Two of the areas where OpenSolaris is most behind Linux are hardware support and desktop/kernel integration. The choice of a GPL-incompatible license strongly discourages any Linux developers from working with the low-level code of OpenSolaris due to the perceived risk of contaminating the Linux codebase at some later point. That rules out a huge pool of skilled developers (I'm going to be potentially controversial here and say that I suspect Linux has a larger skillset here than all the BSDs put together, and quite possibly Solaris added to that) who are writing a good deal of advanced code. Meanwhile we're left with OpenSolaris having even worse laptop support than FreeBSD. These are people who could have added to the community socially as well as technically. Instead you've got a community led by a set of Sun staff who are paranoid about doing anything that might make it look like Sun controls the community. Score.

30 May 2007

Matthew Palmer: E-mail Overload

I'm not suffering from it myself at present, but over at that prince of productivity blogs, 43 Folders, Merlin Mann has a nice piece on "E-mail Bankruptcy. The idea is that if you ever get completely overloaded with unread / unresponded-to e-mail, you just "declare bankruptcy", delete all your unread e-mail, and let the world know that if it's important they should resend it. The best part of the article for me, though, was this description of e-mail overload:
Email is such a funny thing. People hand you these single little messages that are no heavier than a river pebble. But it doesn't take long until you have acquired a pile of pebbles that's taller than you and heavier than you could ever hope to move, even if you wanted to do it over a few dozen trips. But for the person who took the time to hand you their pebble, it seems outrageous that you can't handle that one tiny thing. "What 'pile'? It's just a fucking pebble!"
The next time I get bothered that someone hasn't replied to my e-mail, I'm going to try to remember that they may have a lot of other pebbles in their pile.

Matthew Garrett

The backlight on my Thinkpad failed a while ago. Thankfully, it did so about 12 hours before my warranty expired. After a bit of a delay in getting it sent off for repair, it's now arrived again. The good news is that the backlight works. The bad news:

is that they seem to have managed to punch a hole through the magnesium alloy lid. What larks.

(And the backlight flickers now, which it didn't previously. Tch, eh?)

Matthew Palmer: The Programmer's Rant

Normally I'd sigquote this sort of thing, but (a) it requires a wider audience than the occasional appearance at the bottom of a drivel e-mail, and (b) it's way too long for that. So I'm going to blog it instead. In response to a comment that programming requires the skill of clairvoyancy, a response was:
Required? It just makes you suffer more. You know up front that they'll accuse you of ducking the question when they ask for a schedule and you give one contingent on specific preconditions. You know ahead of time that they'll change the specifications at the last minute. You no ahead of time that if you object to changes without revised budget and schedule that they'll say you're no a team player. You know ahead of time that they'll blame you even though they signed off on the schedule being contingent on no changes. You know ahead of time that there will be nothing that you can do about any of these. So what does your precognition buy you other than an ulcer or perhaps a coronary?

25 May 2007

Matthew Palmer: Who needs Groklaw...

when you've got bash.org?

Matthew Palmer: The Real Reason Software Sucks

Although I feel that The Daily WTF has gone downhill in the last few months (since the rename and addition of different "categories" of story), today's article titled The Great Pyramid of Agile is a good, thought-provoking read. I've tried to find a good "sound bite" quote that really captures the message of the article, but the whole article meshes together a bit too tightly, so just trust me when I say "go and read the article".

17 May 2007

Ross Burton: GTK+ Tip of the Day, Sound Juicer news

First, a tip of the day. Thanks to Matthew Garrett for pointing out that GLib 2.14 will have API for creating timers with second granularity (instead of millisecond): g_timeout_add_seconds(). This means that multiple timers scheduled to go off at roughly the same time will be fired at once, resulting in power savings. I'm pleased to see this land in GLib, and can't wait for GLib 2.14 now as it is looking really good: GRegex and GSequence in particular are interesting new additions. In Sound Juicer news, Luca Cavalli has ported the gedit/Epiphany plugin code to SJ. It's definitely work in progress at the moment, but it is coming together nicely. Follow #311688 if you want to keep up with the changes. The first two plugins I'd like to see from both feature and proof of concept angles are more complete CD playback controls (repeat and random), and downloading of album cover art. NP: Delay, Dub Tractor

Matthew Garrett: Runtime power saving on Linux - the CPU

Modern processors have a variety of low power modes that can be entered while idle. These "C states" are numbered, currently ranging from C0 (a running CPU) to C4 (a deep runtime sleep state). The problem with these states is that the deeper the sleep, the longer it takes the CPU to wake up. In order to avoid excessive reductions in performance, the kernel must keep track of the processor usage pattern and avoid putting the CPU into a deep sleep mode when it's likely that it'll be needed for more work in the near future.

Traditionally, the kernel has had a fixed timer tick - that is, a fixed number of times a second, the timer will generate an interrupt, wake the kernel and allow processes to be rescheduled. This limits the maximum amount of time the CPU can remain idle, as this timer will fire even when the system is otherwise idle. A tick rate of 1000Hz is desirable for reducing latency, but will also result in the maximum sleep period being 1ms. This is less than ideal.

2.6.21 introduced dynamic tick functionality. Now, rather than having a fixed tick interval, if the system is idle the kernel looks at all outstanding timers and schedules a wakeup in time to answer the next timer. This allows much longer periods of sleep without compromising latency. However, for this to be useful it's desirable to have as few timer wakeup events as possible. The longer the CPU is going to be asleep, the deeper the sleep state that can be used.

Intel have recently released Powertop, an application that tracks the causes of wakeups. These wakeups can fall into two categories - kernel and userspace. Pure userspace timers will usually be due to an application having a timer to handle some sort of trivial activity, like blinking a cursor or polling for state. There are a couple of ways to improve this:Things in the kernel can be trickier. Kernel interrupts may be appearing because of some kernel code specifying a timer, but an alternative is that a userspace application is poking them. Many of the same considerations as userspace apply here:Fixing these issues can range from the trivial (removing unnecessary timers) to the complicated (teaching gstreamer about alsa notifications, teaching the mixer applet to listen to signals from gstreamer). It's all helpful, though. Ideally you want your processor to be averaging at least 20ms in the deepest C state before it's woken up again. There's a lot of low-hanging fruit out there, and every fix improves battery life.

Next.

Previous.