Quantcast
Channel: Sysadmin
Viewing all articles
Browse latest Browse all 164364

Funny comments in code or config files...

$
0
0

Was working on some infiniband configs, and I saw this in the openib init script:

** # This function is a horrible hack to work around BIOS authors that should

be shot. **

Specifically, certain BIOSes will map the entire 4GB address

space as write-back cacheable when the machine has 4GB or more of RAM, and

then they will exclude the reserved PCI I/O addresses from that 4GB

cacheable mapping by making on overlapping uncacheable mapping. However,

once you do that, it is then impossible to set any of the PCI I/O

address space as write-combining. This is an absolute death-knell to

certain IB hardware. So, we unroll this mapping here. Instead of

punching a hole in a single 4GB mapping, we redo the base 4GB mapping as

a series of discreet mappings that effectively are the same as the 4GB

mapping minus the hole, and then we delete the uncacheable mappings that

are used to punch the hole. This then leaves the PCI I/O address space

unregistered (which defaults it to uncacheable), but available for

write-combining mappings where needed.

I got a laugh during an otherwise typical Monday...

Anyone else have an funny gems (especially from a vendor)?

submitted by nedtugent
[link] [6 comments]

Viewing all articles
Browse latest Browse all 164364

Trending Articles