Re: There's something rotten in 1.3.x
Linus Torvalds (firstname.lastname@example.org)
Sun, 7 Apr 1996 09:08:15 +0300 (EET DST)
On Sat, 6 Apr 1996, Leonard N. Zubkoff wrote:
> The interesting difference here is in Step 2, where there's an enormous amount
> of system time in 1.3.x compared to 1.2.13. I've never played with kernel
> profiling before, so this seemed like as good a time as any. Alas, for some
> reason readprofile-1.1 didn't work out of the box so I had to fix it first. In
> any event, here's the kernel profiling data for Step 2 in 1.3.84. It seems
> pretty obvious that get_empty_inode has some serious problems...
Yeah, get_empty_inode() is pretty broken. Or rather, the inode lists are
done the wrong way. They haven't been updated since the very original
linux code (I wonder what "diff" would say when comparing 0.01 and 1.3.84
;-), despite the fact that the behaviour of inodes have changed a lot and
there are a lot more of them these days.
It still uses a very stupid linked list, and it traverses all of it. I
didn't realize it was quite _that_ bad in real life (there is a silly
test that often helps to stop the list traversal earlier, but obviously
not all the time).