Using cgroups to force RAM swapping for implementing an Arria 10 design

The problem I needed to implement an FPGA design for an Arria 10 chip with Quartus 15 on a Linux machine. According to Altera’s requirement page, (“Memory recommendations” tab), the computer should have 28-48 GB of RAM. Or, as it says on that page, one can fake it with virtual memory. It turns out the [...]

Linux kernel hack for calming down a flood of PCIe AER messages

While working on a project involving a custom PCIe interface, Linux’ message log became flooded with messages like pcieport 0000:00:1c.6: device [8086:a116] error status/mask=00001081/00002000 pcieport 0000:00:1c.6: [ 0] Receiver Error pcieport 0000:00:1c.6: [ 7] Bad DLLP pcieport 0000:00:1c.6: [12] Replay Timer Timeout pcieport 0000:00:1c.6: Error of this Agent(00e6) is reported first pcieport 0000:02:00.0: PCIe Bus [...]

syslogd notes

A few jots on playing with the system logger (the one that writes to /var/log/messages) on an ancient CentOS 5.5. First, check the version: It says Oct 6 15:12:06 diskless syslogd 1.4.1: restart. So it’s a quite old revision of syslogd, unfortunately. There are no filter conditions to rely on. The relevant configuration file is [...]

Linux kernel compilation jots

General These are a few random notes to self regarding kernel compilation. The preferred vanilla kernel rep to use is Linux Stable: $ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ It’s often a good idea to pick a kernel version that was released a while ago, but with a high sub-subversion number. So it has been tested properly and [...]

Linux: Yet Another Google Chrome “Aw, snap” solved.

“Aw, snap” in Google Chrome happens when a process (or thread?) involved with Chrome dies unexpectedly. I got quite a few of those, and learned to live with them for about a year, as I couldn’t figure out what caused them. It was clear that it had to do with Adobe Flash somehow, and that [...]

Playing with Linux namespaces

Intro Linux namespaces is the foundation for container-based virtualization, which is becoming increasingly popular. Aside from the ability to isolate a shell (and the processes it generates) from the “main environment”, as is required for this kind of lightweight virtualization, namespaces is useful for overriding selected functionalities. So I’m jotting down things I use myself. [...]

iowrite32(), writel() and memory barriers taken apart

Introduction Needing to remove superfluous memory barriers from a Linux kernel device driver, I wondered what they actually do. The issue is discussed down to painful detail in Documentation/memory-barriers.txt, but somehow it’s quite difficult to figure out if they’re really needed and where. Most drivers rely on subsequent iowrite32′s (or writel’s) to arrive to the [...]

SOLVED: Lenovo Yoga 2 13″ with “hardware-disabled” Wifi

Overview Having a Lenovo Yoga 2 13″ (non-pro) running Ubuntu 14.04.1, I couldn’t get Wireless LAN up and running, as the WLAN NIC appeared to be “hardware locked”. This is the summary of how I solved this issue. If you’re not interested in the gory details, you may jump right to bottom, where I offer [...]

i.MX: SDMA not working? Strange things happen? Maybe it’s all about power management.

I ran into a weird problem while attempting to enable SDMA for UARTs on an i.MX53 processor running Freescale’s 2.6.35.3 Linux kernel: To begin with, the UART would only transmit 48 bytes, which is probably a result of only one watermark event arriving (the initial kickoff filled the UART’s FIFO with 32 bytes, and then [...]

Wine: Picasa failed to start Fedora 12 after a kernel upgrade

I upgraded my kernel from 2.6.35 to 3.12, and Picasa 2.7 failed to start. Instead of starting, tons of winedbg processes were created at a rapid speed. If I didn’t kill everything related to Picasa within a minute or so (that is, all winedbg processes and any process having “picasa” in the string of “ps [...]