Monthly Archive for October, 2008

Some updates (kernel/ports)

There was not much to tell in the last months. I was busy with moving and the pregnancy of my wife (ok, she was more busy with this than I was…).

So the recent updates are, that I took some time to commit some of my patches to SVN. Most of them are in my SVN user area in various branches. The interesting ones may be deskjail and linuxaio. The first one allows to run your desktop in a jail. The second one gives async I/O for the linuxulator.

There’s also some other stuff. Feel free to have a look.

It also seems that the we may see the Fedora 8 infrastructure landing in the ports collection “soon”. I have the impression that Boris just waits for the complete unfreeze of the ports collection. The last patch I’ve reviewed looked very good. There are some loose ends, like switching it on as the default linux base for FreeBSD–current for example, but those are things which I prefer to do later than in the same commit. First let it be there for a while and let curious users test it a little bit more. If everything is ok, we can switch the default linux base to F8 in –current.

Share/Bookmark

 

 

Linux on the HP 2530p

Two weeks ago or so I got a lovely new laptop, the HP Elitebook 2530p, but quickly found that ACPI on it would make it hang at boot. I installed with acpi=off, and used it as a desktop-style testing machine while we tried to figure out what was going wrong with it. It was kind of rough, as someone who's never debugged ACPI before -- the googling gives you documentation that advertises itself as stale (so why does it exist?), and the real documentation isn't where it should be. The ACPI guys I know seemed stumped -- various debug output all came up clean, yet enabling ACPI caused boot-time hangs in the ACPI battery, ACPI thermal, and HDA drivers.

It turned out after I nuked a bunch of BIOS options, that the option to enable the fan while AC is on is what was causing it. Disable it for linux on 2530p happiness.

Also, suspend/resume works out of the box, as long as your box includes loading the Intel DRM.

 

 

doing it right

Things are looking up in the Intel driver. The GEM work has landed in Linus's master, meaning that at this point we can worry about just fixing our bugs, and know that it's going to end up in 2.6.28.

But what gets me even more excited than getting our first major kernel merge done is that we're starting to create a culture of review surrounding our driver. Keith started by insisting on posting patches instead of git trees, which meant that I read his patches and found issues before they were queued for upstream. I started posting patches in retaliation, and he kept NAKing them for needing improvements (which I've usually got around to) or being obsoleted by better work he did. Now we've got the rest of the team joining the party. While it has slowed things down a bit, it's also nice -- the internal TODO list of "someone committed some junk and I need to go fix it up when I get some time" is no longer growing out of control, and stability is definitely increasing.

The majority of the improvements in the last week have been in vblank handling. The vblank-rework changes had gone through a series of QA cycles before I merged them, but there were some issues that cropped up in integrating them with the GEM changes, and there were some plain old bugs we found when we started trying to use them on our desktops. We also fixed some VT switching bugs that would have hurt suspend/resume, and a couple more G4X issues.

My highest priority now is sorting out our failures with batchbuffers being too large. Our testcases up until now have had texture load below the size of the aperture. However, with more interesting apps like sauerbraten or Virtual Forbidden City, we're running into a problem where we accumulate a batchbuffer for execution that can't be loaded into the aperture all at once, and you get an error message and no rendering. Dave Airlie had fixed this in classic mode with his check_aperture changes, but we never did them for GEM, since figured we'd have the whole aperture available instead of just 32MB. But when a single mipmapped texture is 24MB, we run out of aperture quickly anyway. There are a few things we're planning on doing to resolve the problem:

  • Implement check_aperture on GEM so that we can flush the batch when it's likely going to be too big for the aperture. This will avoid having rendering dropped on the floor for being too big.
  • Fix counting of aperture space consumed in check_aperture. Right now we just sum up all the sizes of buffers targeted by relocations, but if you keep referencing the same big buffer over and over you'll flush too often.
  • Implement PPGTT support for new chipsets. This gives us a 2GB virtual address space for your batchbuffers to play in instead of 256 or 512MB. I'm trying to avoid saying "that'll be enough for anybody", but it'll certainly make a lot of apps happier. This'll be a bit of work, as we don't have a PCI aperture mapping to that address space, so we can't use some of our old tricks the same way. However, it should be a pretty significant win on any serious 3D workload.


We're also looking into getting an appropriate API into the kernel for our transient mappings of the aperture. One of the sticking points in getting GEM merged was a hack we were doing with the kernel mapping APIs on CONFIG_HIGHMEM x86. By actually sitting down and writing the API we need, we should get improved performance in PAT non-MTRR environments (like the G[M]45 where we don't get an MTRR slot), and improved performance on 64-bit where we couldn't do the CONFIG_HIGHMEM hack, for a 20% to 200% improvement depending on which case of failure occurred. By being in a kernel tree, we can submit a single patch to the kernel community showing the API we want and how we plan to use it, and get much better feedback than we've been able to in the past. In this case, Ingo came up with fun ideas for how we can get the advantages of our atomic mapping path on CONFIG_HIGHMEM x86 without the scheduling restrictions of actually being atomic, which would be awfully convenient for one of our code paths.

For those looking to run the latest hotness, here's the list:
kernel: drm-intel-next in my tree (still has some bugfixes to be merged)
libdrm: 2.4.0 (nothing major has happened since then)
xf86-video-intel: 2.5.0 (nothing major has happened since then)
dri2proto master
inputproto master
xserver: master (be sure to update your input drivers too!)
mesa: master

That's 2 things with version numbers on them compared to 2 weeks ago. The X server would be in the list too, but we missed that the glyph cache didn't make it into the 1.5 series, which is critical for 2D performance.

 

 

BusyBSDCon

Despite getting home at a civilized hour Sunday night, thanks to a ride from a colleague, I couldn't find my voice yesterday morning and spent most of the day in bed. BSD conferences are very bad for one's sleep-wake cycle.

I had a very good EuroBSDCon, as usual. My (Warner's) talk was a bit more hand-wavy than I had intended it. I discovered that I had run through almost half my slides in ten minutes talking at a rate of about 0.7 rwatson. Slowing down a bit I managed to finish the talk in about 45 minutes.

Some very interesting questions from the audience. Looks like people are getting interested in embedding BSD. People are starting to realize how dangerous GNU really is.

I'm looking forward to MeetBSD in California next month. I expect the weather to be a bit warmer there than in Strasbourg. :-)

 

 

At EuroBSDCon 2008

I spent a significant part of yesterday on the train to Strasbourg. It was not a TGV so there were only two power outlets. I had to fight with a besuited gentleman over the one nearest to me.

Slept briefly last night after spending some time at the "Académie de la Bière". I had some excellent French beers most of whose names I've predictably forgotten.

The devsummit is well underway. We're all talking together on IRC. :-)

There is coffee.

 

 

Marvell ARM support in svn

Rafal Jaworowski just committed support for a number of Marvell Processors. There are a number of commits going into the tree. He's just completed the first of these:
Introduce low-level support for new Marvell core CPUs: 88FR131, 88FR571.

From an earlier email message, we know that Rafal is working on support for Marvell 88F5182, 88F5281, 88F6281, and MV78100 SoCs.

The following peripherals will likely be supported:
  • EHCI USB 2.0
  • Ethernet
  • GPIO
  • Interrupt controller
  • L1, L2 cache
  • Timers, watchdog, RTC
  • TWSI (I2C)
  • UART

This is a fairly mature port that is going into the tree. It works with NFS or USB mounted root filesystems. The port is self hosted. Kernel and world builds succeed on the box. The box also boots to multiuser mode. Rafal has created a web page with all this information on it on the FreeBSD wiki at http://www.wiki.freebsd.org/FreeBSDMarvell

This is way cool news! Good Job Rafal.

Note: Much of this information was taken from a posting Rafal made to arm@freebsd.org.

 

 

Some updates for English speaking readers

As you probably know, I’m in Providence, RI, to work on my thesis at Brown University. Everything is fine: I’m here since a week (tomorrow) and I’m settled with accomodation, work, mobile phone number, bank account and so on.

I’m really excited of being in a new city: new places to see, new things to do, new people to know. I already began seeing places, doing things and getting to know new people: last weekend I was in Boston and in the White Mountains Region, NH, to see the foliage (it was beautiful, see pictures on Flickr: Boston and Foliage). Thanks to my German room-mate Fabian I also got involved in the intramural soccer championship (since I’m Italian, you know..).
I got an office in the CS department and today was my first day of real work. The CS department looks like an environment where being productive is easy, which is just great and what I need.

That’s all, folks. Stay tuned!

Uh, yeah, a final note: I won’t attend NYCBSDCon although I’m pretty near NYC (just two hours by train). Sorry guys, but I’ve so many things to do that the conference didn’t get the maximum priority. I may come to MeetBSD, anyway…

 

 

gxemul update

Oleksandr Tymoshenko posted a patch to gxemul that allows FreeBSD/mips to boot on it.

I've committed it to the gxemul port. So now if you have gxemul 0.4.6.5_1 or later, you can run FreeBSD/mips, the MALTA kernel. I'll post a howto and a pointer to a image in a few days.

 

 

SD/MMC work

Recently, I've pushed many bug fixes from Alexander Motin to the SD/MMC stack. He's submitted a driver for the SD Assocaition's standard SD Host Controller, and fixed many of these minor issues as part of doing that. I've tested these improvements on my AT91RM9200 system that boots off an SD card.

There should be more support for MMC cards, as well as SDHC cards forthcoming. In addition, once I get a chance to review the sdhc driver, it too may be ready to head into the tree. I know that if I had such a working driver, I'd be able to work more on SDHC and MMC card support. The current AT91RM9200 box I have makes it difficult...

Stay tuned for more updates.