Why are politicians really good in quantum mechanics? Here a clue.
(via jtotheizzoe)
Source: scienceisbeauty
Annoyances with Adobe 11.2 in Linux
In the last days, Adobe announced that Adobe 11.2 was gonna be the last linux version, but since Google Chrome runs both in Linux and Windows, then Linux users will get updated versions of Flash via Google Chrome.
Now, if you have an Nvidia video card and are using the manufacturers driver, then in some of the YouTube videos you get wrong tint, in particular, faces and skin in general got a bluish tint.
One can easily fix this by creating the following configuration file: /etc/adobe/mms.cfg containing,
- EnableLinuxHWVideoDecode=1
- OverrideGPUValidation=true
Disabling Turbo Boost in Linux
Intel Turbo Boost is a technology used to increase the frequency of the internal CPU cores of a processor. One can say that it is an automatic overclocking facility.
The frequency gain depends on the number of cores active at a moment. The less processors active, the greater frequency gain.
Additionally, the current processor temperature, and power/current consumption are taken into account. If the temperature is not excessive, then an extra frequency boost can be applied. A similar situation happens if we are plugged into the wall or if we are running on battery.
Since we do some speed benchmarks, and controlling the frequency boost at a given time is hard due to different environment temperature around the globe, the recommendation is to disable it. I mean, reproducing the experiment on a computer in a different geographical location will give mixed results, hence, we disable it for easiness.
To read the current state of the Turbo Boost, we need to install the msr-tools. The package is available for Linux, and there is a Mac and Windows version. In the case of Windows, “they say” that one can setup the maximum frequency to 99%, that should do the trick.
The msr-tools are a couple of instructions to read the MSR registers: Model Specific Register. For the Sandy Bridge micro-architecture, the flag for the Turbo Boost is the 38th bit of the 0x1a0 register.
To know if the Turbo Boost feature is disabled, run:
rdmsr -pi 0x1a0 -f 38:38
- 1=disabled
- 0=enabled
where i stands for the core number. Alternatively, one can run the following linux command:
cat /proc/cpuinfo | grep “cpu cores” | uniq -c | xargs | cut -d\ -f1,5| awk ‘{print “ht”,($1!=$2)?”on”:”off”}’
Please note that this is a per core feature. In deed, it is good that this is a per core feature since one can disable the Turbo Boost in all of the CPU cores exempt one to improve the performance of a single-core application. When the Turbo Boost is required for a single core, the frequency boost is greater (so, one can more less warranty that our application takes the most of the processor).
To disable the Turbo Boost feature, one can set the entire 0x1a0 MSR register to 0x4000850089, as in here:
wrmsr -pi 0x1a0 0x4000850089
again, the i refers to the particular CPU core.
Please note that one needs permissions to run that, hence, a sudo modifier may be required.
—LJ
UPDATE: Thanks to Diego Aranha for the info, which got it from Mike Scott.
For more information, please refer to Table 34-10, page 3945 of the Intel 64 and IA-32 Architectures Software Developer’s Manual, combined volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C.
Git and SE Linux
These days I had troubles setting up a CVS server I was requested to have running. Since I had a flight coming, I gave up and went to the airport. Latter on, someone asked me to have git instead of a regular (rather boring) cvs server, challenge accepted!
The problem is that I want the server to have SE Linux activated, so that was an added difficulty level.
Thanks to the system-config-selinux utility, I was able to figure it out the required context for the SE Linux policy: git_sysytem_content_t in /srv/git(.*)?
One can definitely change that, but… here are the steps to setup a clean git repository from existing code.
- cd /
- mkdir -p /srv/git
- mkdir myproject
- cd myproject
- git init
- [copy your files here]
- git add .
- git commit -m ‘Initial commit’
- cd /srv
- chcon -t git_system_content_t git -R
Now, one only needs to decide how to run the git server. I have chosen to run it via xinetd, which only needs to enable the corresponding service, and point the server to /srv/git.
—LJ
P.S. I presume the issue when setting up the cvs server was related…
UPDATE: the path for cvs is /opt/cvs, and the context is: cvs_data_t
PS2: This is valid for CentOS 6.2 :)
I never had/could to stay up all night at the lab, because it was closed at night (and security were really mean and serious about that) , but otherwise…
Adopt a Graduate Student
I mean, JUST LOOK AT THEM.
Tear …
Source: jtotheizzoe


