${WITTY_TITLE}https://wmkrug.com/2015-07-24T21:56:00-04:00VMWare and the latest Linux kernels2015-07-24T21:56:00-04:002015-07-24T21:56:00-04:00Waynetag:wmkrug.com,2015-07-24:/vmware-linux-3.19.html<p>Last week I pulled the 4.0.0-2 kernel from the Debian testing repositories and
started using it on my main box. Yesterday morning I try to start VMWare Workstation 11 for
the first time since upgrading the kernel, only to have the driver install fail.
Some poking around revealed …</p><p>Last week I pulled the 4.0.0-2 kernel from the Debian testing repositories and
started using it on my main box. Yesterday morning I try to start VMWare Workstation 11 for
the first time since upgrading the kernel, only to have the driver install fail.
Some poking around revealed that the network driver was failing because of
apparent changes in the kernel headers.</p>
<p>I manually unpacked the driver source (located in <tt class="docutils literal">/usr/lib/vmware/modules/source</tt>)
and started debugging the compiler errors. I found four:</p>
<ol class="arabic simple">
<li>One of the VMWare headers defined <tt class="docutils literal">PCI_VENDOR_ID_VMWARE</tt>, which is in the kernel
headers as of 4.0.</li>
<li>The function <tt class="docutils literal">alloc_netdev</tt> gained an additional argument in 3.17.</li>
<li>The driver code was referring to the <tt class="docutils literal">f_dentry</tt> member of <tt class="docutils literal">struct file</tt>. This
member was a <tt class="docutils literal">#define</tt> that was removed in 3.19.</li>
<li>The driver code was referencing function <tt class="docutils literal">skb_copy_datagram_iovec</tt>, which was also
removed in 3.19.</li>
</ol>
<p>The first three were easy enough to fix. For the first, just remove the redundant
<tt class="docutils literal">#define</tt> from the driver header. For the second, add <tt class="docutils literal">NET_NAME_UNKNOWN</tt> as
the third argument to <tt class="docutils literal">alloc_netdev</tt> (I got that from StackOverflow, I think).
For the third, replace the reference to <tt class="docutils literal">f_dentry</tt> with the code that used to be
in the <tt class="docutils literal">#define</tt>.</p>
<p>The fourth was trickier. There was no clear replacement
for the removed function. Fortunately, I was able to track down a <a class="reference external" href="https://communities.vmware.com/message/2524458">recent post</a> on the VMWare message boards asking
about these same issues. That gave me the solution for the third problem: replace the
missing function with the following:</p>
<div class="highlight"><pre><span></span><span class="k">struct</span><span class="w"> </span><span class="nc">iov_iter</span><span class="w"> </span><span class="n">to</span><span class="p">;</span>
<span class="n">iov_iter_init</span><span class="p">(</span><span class="o">&</span><span class="n">to</span><span class="p">,</span><span class="w"> </span><span class="n">READ</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">iov</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">len</span><span class="p">);</span>
<span class="k">return</span><span class="w"> </span><span class="n">skb_copy_datagram_iter</span><span class="p">(</span><span class="n">skb</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">to</span><span class="p">,</span><span class="w"> </span><span class="n">len</span><span class="p">);</span>
</pre></div>
<p>To resume the driver install after making these changes, I repackaged the driver source
into the tarball in the VMWare source directory (command <tt class="docutils literal">tar <span class="pre">-cvf</span> vmnet.tar <span class="pre">vmnet-only/</span></tt>)
so the VMWare driver installation program would use it and finish installing the other
components. I had no problems with anything else in the driver builds, and was able to
start my Windows VM with no issues using the modified source.</p>
<p>I should note that one of the commenters on the VMWare board mentioned that the proper
fix for the <tt class="docutils literal"><span class="pre">filep->f_dentry</span></tt> line is to replace</p>
<div class="highlight"><pre><span></span>if (filp && filp->f_dentry) {
inode = filp->f_dentry->d_inode;
}
</pre></div>
<p>with</p>
<div class="highlight"><pre><span></span>inode = file_inode(filp);
</pre></div>
<p>I did not do this, since I just wanted a quick-and-dirty fix for the driver so I
could get to my VMs again.</p>
Rehabbing the site2013-09-19T13:22:00-04:002013-09-19T13:22:00-04:00Waynetag:wmkrug.com,2013-09-19:/rehabbing-the-site.html<p>So, it has been 14 months since I have posted anything. I have had a lot
to say over those months, but developing the urge to sit down and write
about them instead of doing more "stimulating" things has been hard. I
really want to start getting more things down …</p><p>So, it has been 14 months since I have posted anything. I have had a lot
to say over those months, but developing the urge to sit down and write
about them instead of doing more "stimulating" things has been hard. I
really want to start getting more things down on virtual paper, though,
so I am going to try scheduling small writing blocks each day and get
myself to generate content instead of always consuming it.</p>
<p>In addition, I switched the commenting system over to Disqus. I am
having some issues with it, primarily importing old comments. It also
seems to have shut down comments on the "About Me" page, though I may
just leave it that way.</p>
Ubuntu backlight brightness2012-07-19T10:50:00-04:002012-07-19T10:50:00-04:00Waynetag:wmkrug.com,2012-07-19:/ubuntu-backlight-brightness.html<p>Since I bought my new laptop a few months ago and installed Ubuntu 12.04
on it I have not been able to adjust the brightness of the backlight.
Until yesterday, this had not bothered me much; I typically use my
laptop in well-lit rooms so the extra brightness was …</p><p>Since I bought my new laptop a few months ago and installed Ubuntu 12.04
on it I have not been able to adjust the brightness of the backlight.
Until yesterday, this had not bothered me much; I typically use my
laptop in well-lit rooms so the extra brightness was a minor annoyance.
Yesterday at the <a class="reference external" href="http://conference.scipy.org/scipy2012/">SciPy
conference</a> it became an issue
while sitting for extended periods of time in the darkened main
ballroom. A bit of searching led me to <a class="reference external" href="http://askubuntu.com/questions/9047/cant-adjust-brightness-on-my-laptop">this
question</a>
on AskUbuntu, which is not specifically about my laptop model but
provides a general fix that worked for me. The fix, summarized here:</p>
<ol class="arabic simple">
<li>Edit <tt class="docutils literal">/etc/default/grub</tt></li>
<li>Change the line <tt class="docutils literal"><span class="pre">GRUB_CMDLINE_LINUX=""</span></tt> into
<tt class="docutils literal"><span class="pre">GRUB_CMDLINE_LINUX="acpi_osi=Linux"</span></tt></li>
<li>Run <tt class="docutils literal">sudo <span class="pre">update-grub</span></tt></li>
<li>Restart the machine</li>
</ol>
<p>This is a <a class="reference external" href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/780625">known
bug</a> in
Ubuntu with no definite timeframe for a fix.</p>
My frustrating Friday2012-02-06T01:41:00-05:002012-02-06T01:41:00-05:00Waynetag:wmkrug.com,2012-02-06:/my-frustrating-friday.html<p>Last Friday (03FEB12) I had the first code review for a major new
feature I'm currently working on. The design and implementation of this
feature are my responsibility, and I'm the only one working on it, so I
feel a significant amount of pride, responsibility, and ownership. From
this overly-sensitive …</p><p>Last Friday (03FEB12) I had the first code review for a major new
feature I'm currently working on. The design and implementation of this
feature are my responsibility, and I'm the only one working on it, so I
feel a significant amount of pride, responsibility, and ownership. From
this overly-sensitive perspective, the review didn't go so well.</p>
<p>The application implements real-time signal processing algorithms
running on a cluster of machines configured as a grid. Its completely
written in ANSI C, despite the fact that one of the overarching design
requirements is that the top-level application have no platform-specific
code unless absolutely necessary. I don't agree with the language
choice, but the project has sensible reasons for this (the application
has a lot of legacy and only two engineers besides myself (out of a team
of 18) know C++, and since no one besides me really knows any other
languages). Where I start to butt heads, and get increasingly irritated,
is in the design choices.</p>
<p>I write object-oriented C as much as sensible, though I do sometimes
break encapsulation to make my new code fit cleanly into the legacy
portions. I try to break my code up into small, descriptive functions to
make it easy to tell what is going on where. I try to keep variable
declarations within the innermost scope they are required in. I make
heavy use of <tt class="docutils literal">const</tt>, and initialize variables at declaration. None of
these are appreciated, and some aren't even tolerated.</p>
<p>Now, I don't want to give the impression that I whine about having to
follow coding standards. I don't. Standards are necessary, especially on
a large project, where stylistic issues come down to personal
preference. However, everything I mentioned above has valid, functional
purposes. Some are considered best practices, not only in C but most
other languages as well. Yet in my leads' ideal world, none of those
elements (except possibly <tt class="docutils literal">const</tt> usage) would be present in the code.</p>
<p>In this most recent review, I got called on #3 and #4. They want to see
all the variables declared at the top of the function, and would prefer
them to be initialized at the beginning of the function itself. The
reasoning: maintainability. The whole reason for #3 and #4 in the first
place is maintainability (and, in a few cases, optimization). However,
the code they have been writing and reading for the past 20+ years
hasn't changed measurably from K&R's style.</p>
<p>The current codebase is unmaintainable, and the corporate coding and
design standards were tailored to match the style of all the 15-year-old
legacy code the application is built on, to avoid the work of having to
update the old code to new standards. A few months ago, I compared the
corporate standard to the project standard, and was not happy with the
items they tailored. The corporate standard is much more sensible, and
we should have updated our codebase as we went to meet it, not make the
old code compliant by definition.</p>
<p>I didn't really want to use this blog for venting about my job, but I'm
losing sleep over this tonight and felt writing about it might help.</p>
Ideas, and an Eclipse trick2012-01-16T03:41:00-05:002012-01-16T03:41:00-05:00Waynetag:wmkrug.com,2012-01-16:/ideas-and-an-eclipse-trick.html<p>When I started this blog I knew my updates would be infrequent, but I
didn't expect to go ten months without one. I've had many ideas for
posts, and other things, in that time. I have tried different methods to
help me remember these ideas, from sending myself emails to …</p><p>When I started this blog I knew my updates would be infrequent, but I
didn't expect to go ten months without one. I've had many ideas for
posts, and other things, in that time. I have tried different methods to
help me remember these ideas, from sending myself emails to maintaining
a Google Documents list to carrying around a little spiral-bound
notebook. So far, none of these methods has really done anything for me.</p>
<p>A couple weeks ago I read a blog post by someone else who had similar
problems with some of the methods I describe above, in particular the
notebook method. (I wish I could find the link to this blog. If I come
across it again, I'll add it.) He finally settled on using small blank
cards to capture his ideas and thoughts. He writes a single thought on a
blank card when it pops in his head; at the end of the day, he takes the
used cards and stores them in a box that he consults regularly. I've
decided to implement this by cutting some blank 3x5 index cards in half
and carrying the pieces in my wallet. When I have an idea, I write it
down and put the card back in my wallet. I'm still trying to build a
habit out of this, and I'm still working on the storage and regular
consultation parts, but so far its working better than my notebook did.
In fact, the Eclipse trick I'm going to mention is one of the first
things I wrote down using this method.</p>
<p>I've been using Eclipse at work for my C and C++ development for the
past four months or so. The vast majority of my development is in C,
though, so for our core application code I've been creating C projects
in the CDT. The other day, however, I wanted to work on a small amount
of C++ code that is part of an external tool that gets rolled up in our
application. Since my project only has the "C" nature Eclipse couldn't
resolve any of the C++ headers or keywords, making it fairly useless for
editing this tool code. Unfortunately, once you create a CDT project and
choose either "C project" or "C++ project", there is no way to change
this decision; in particular, there is no way through Eclipse to add the
C++ nature to a C project. I discovered after examining the Eclipse
project file that there is a way.</p>
<p>The project XML has a section named <tt class="docutils literal"><natures></tt>, which lists all of
the natures associated with the project. All you have to do to add C++
to a C project is add the line</p>
<p><tt class="docutils literal"><span class="pre"><nature>org.eclipse.cdt.core.ccnature</nature></span></tt></p>
<p>to the <tt class="docutils literal"><natures></tt> section of the C project. Reopen the project, and
you should have C++ listed as a language in the symbols and paths
screens. This saved me from having to re-generate the whole project, or
work outside Eclipse, just to handle that little bit of C++ code.</p>
Oops...2011-03-07T04:13:00-05:002011-03-07T04:13:00-05:00Waynetag:wmkrug.com,2011-03-07:/oops.html<p>So, after a 12-day hiatus, the site is back up. I lost yet another hard
drive in my web server, and I foolishly was not making regular backups.
Won't be making that mistake again.</p>
<p>Anyway, I should have the follow-on to that STEM post soon, though with
PyCon mere days …</p><p>So, after a 12-day hiatus, the site is back up. I lost yet another hard
drive in my web server, and I foolishly was not making regular backups.
Won't be making that mistake again.</p>
<p>Anyway, I should have the follow-on to that STEM post soon, though with
PyCon mere days away now it might not be until next week.</p>
On the technical skills shortage and hiring practices2011-02-16T03:57:00-05:002011-02-16T03:57:00-05:00Waynetag:wmkrug.com,2011-02-16:/on-the-technical-skills-shortage-and-hiring-practices.html<p>Well, when I said I would be posting infrequently, I didn’t expect to go
three weeks between posts. I’ve had the thoughts for this post floating
around in my head for the past couple weeks, but only today have they
coalesced into something coherent.</p>
<p>The issue of skills …</p><p>Well, when I said I would be posting infrequently, I didn’t expect to go
three weeks between posts. I’ve had the thoughts for this post floating
around in my head for the past couple weeks, but only today have they
coalesced into something coherent.</p>
<p>The issue of skills shortages and inadequate STEM education in the US
has been a noteworthy issue for me for at least the past year, partly
for personal reasons and partly due to the significant role my employer
plays in the current STEM education push. Since the shortages and the
education are two somewhat-distinct stages of a pipeline, I intend to
cover them in separate posts. This post covers the (supposed) skills
shortage in the current workforce, which is the more personal of the
issues for me; I’ll discuss the STEM education in a follow-up post.</p>
<p>Vivek Wadhwa posted <a class="reference external" href="http://techcrunch.com/2010/12/04/shortage-of-engineers-or-a-glut-no-simple-answer/">a
piece</a>
on TechCrunch a few months ago covering a range of issues with
engineering employment. Something in particular stuck out to me:</p>
<p>Alden postulates that employers are looking for very precise skill sets
that are not readily available either because of inadequacies in U.S.
education and training, or because of insufficient mobility in the labor
force.</p>
<p>I definitely agree with the first part of this statement. However, I
don’t think training and mobility are the driving issues, though they
certainly are issues. In my rather unscientific survey of job postings,
I generally see two things: 1) requiring years of experience in precise
skill sets; 2) strong preference for, and sometimes explicitly rejecting
anyone but, local candidates. If good candidates are routinely rejected
for one or both of those reasons, then solving the problems Alden
mentioned won’t make much headway. In fact, this trend is one of a few
things I think calls into question the efficacy of the STEM education
movement, but that is a subject for my next post.</p>
<p>Then there is the appropriateness of the precise requirements. One of
<a class="reference external" href="http://techcrunch.com/2010/12/04/shortage-of-engineers-or-a-glut-no-simple-answer/#comment-106671934">Vivek’s
commentators</a>
summarized this problem well:</p>
<blockquote>
<p>My experience is that companies are asking for specific skill sets
that aren’t remotely connected to what the position needs. For
instance, I saw an ad for the position I am currently happily in,
and I didn’t apply because I didn’t have most of the skills they
wanted. However, when I saw a link to the same ad from someone I
knew who was working in the company, I gave it a shot and was hired
right off the bat (because my skills were known to that person).</p>
<p>After a couple of weeks in the position, I could see that someone
with the skills they were asking for would have been VERY unhappy in
the position. These skills are very commonly advertised for in the
industry I’m in, and I can’t help thinking that they’re probably as
irrelevant in many of the other jobs as they are in this one, and
companies insisting on those skills are eliminating many candidates
that are likely perfect for the job in favor of ones that could be a
poor fit (even if they’re available).</p>
</blockquote>
<p>I have been there myself, having a position where the description didn’t
match well with the actual work. To some degree, this inaccuracy is
unavoidable; nobody can craft a job description that encompasses
everything the position will be required to do. Still, after getting the
job you should not hear something to the effect of, “You’re awesome, but
we wouldn’t have hired you based on your resume.”. (I got this position
through my department manager, so I didn’t formally apply.) I have
coworkers who feel deceived to various degrees about what to expect on
our current program as well.</p>
<p>From my little corner, these inappropriate filter functions appear to be
a serious impediment to successfully filling engineering positions.
These mostly affect large companies, but these are the same large
companies pouring millions into the STEM effort and trying to get the
federal government to do the same. The same companies that claim to be
committed to “attracting and retaining world-class talent”. Perhaps
these companies should take a critical look at their own houses before
proclaiming a critical shortage, or be honest about what they are
looking for.</p>
I’m going to PyCon2011-01-24T03:56:00-05:002011-01-24T03:56:00-05:00Waynetag:wmkrug.com,2011-01-24:/im-going-to-pycon.html<p>Last night I registered for <a class="reference external" href="http://us.pycon.org/2011/home/">PyCon
2011</a> in Atlanta, GA. This is my first
“real” technical convention, and I’ll be going as an individual. I’ve
been to an internal symposium at my company, but they’re generally too
cheap to send people to things like this. So, not …</p><p>Last night I registered for <a class="reference external" href="http://us.pycon.org/2011/home/">PyCon
2011</a> in Atlanta, GA. This is my first
“real” technical convention, and I’ll be going as an individual. I’ve
been to an internal symposium at my company, but they’re generally too
cheap to send people to things like this. So, not only am I paying for
the whole thing myself, but its also my Spring Break. I think its going
to be worth it, though.</p>
<p>I love Python. I taught the language to myself because I wanted to learn
a new language and was looking for a more flexible, powerful replacement
for Perl. I was parsing floating-point data out of the output of various
applications and analyzing it, and while Perl rocked for the parsing
part I had to take the parsed output and feed it into either
Excel/OpenOffice or Matlab for the analysis part. Python let me do
everything at once, including the interactive prompt that previously
made Matlab my tool of choice. Little did I know, at the time, that this
original use just scratched the surface of what the language could do.
Since then, I’ve written everything I can get away with in Python. I
wrote my own interactive console for controlling our applications in our
development lab. I wrote a small control program designed to work with
the PBS job control system to run multiple small scripts in parallel on
each core requested by the PBS job. I do all of the homework for my
current Masters course in Python. I even write and use Python
applications to support my play in EVE Online.</p>
<p>I haven’t been able to connect with any Pythonistas locally, though. At
my company, the software engineers are mostly fluent in C only (some in
C++), and the analysts only really know Fortran and Matlab. The software
development landscape in the Metroplex is dominated by enterprise
activities, owing to the density of corporate headquarters here, so its
heaven for Java and .NET developers but rather barren for others. So,
I’m really looking forward to this conference as a way to meet other
practitioners, find out where the language is going (technically and
professionally), and learn something from real people as opposed to
books and webpages. Plus, it gives me a chance to scout out Atlanta some
more, since it appears to be an interesting city with interesting
opportunities.</p>
Let’s get this party started2011-01-23T03:55:00-05:002011-01-23T03:55:00-05:00Waynetag:wmkrug.com,2011-01-23:/lets-get-this-party-started.html<p>Welcome to my little piece of the Internet. I envision this blog
becoming a repository for my activities in and opinions on software
development and computer science, occasionally with a note on some of my
other diversions. I’ll avoid much commentary on my day-to-day job,
though some will be …</p><p>Welcome to my little piece of the Internet. I envision this blog
becoming a repository for my activities in and opinions on software
development and computer science, occasionally with a note on some of my
other diversions. I’ll avoid much commentary on my day-to-day job,
though some will be unavoidable.</p>
<p>Since I’m not someone who likes to hear myself talk, my posting
frequency will be fairly low and sporadic. I favor quality over
quantity. Also, I’m still feeling my way around WordPress, so the
appearance of this site may change quite a bit over the course of the
next few weeks as I settle down on a “final” look and get some static
pages up. With that, this blog is open for business.</p>