[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#620297: base: vmstat and /proc/loadavg disagree



I tried a number of kernels on the lenny machine where I'm seeing this
issue, and my results match Lesław's. The load average issue still
exists in 2.6.32.y. The two upstream patches correct the load average
calculation, but only if I also set CONFIG_NO_HZ=n. See the attached
image.

Incorrect load average:
2.6.32-bpo.5-amd64
2.6.32.55
2.6.32.55-620297patch
2.6.32.55-620297patch (nohz=off)

Correct load average:
2.6.32.55-620297patch (CONFIG_NO_HZ=n)

Since CONFIG_NO_HZ=y is default on the debian kernels, the two
upstream patches alone are not going to be enough to fix this issue. I
tried to find more upstream commits related to load averages and
NO_HZ, but came up empty.

If someone can find other commits that might fix load averages in the
NO_HZ=y case, I am happy to try them on my setup.

  Aman

On Thu, Feb 2, 2012 at 1:43 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> found 620297 linux-2.6/2.6.32-30
> found 620297 linux-2.6/2.6.32-36
> tags 620297 + patch moreinfo
> quit
>
> Hi,
>
> Aman Gupta wrote:
>
>> The Ubuntu guys pulled the two upstream patches into their 2.6.32
>> build, and the RedHat guys did the same in their 2.6.35 and 2.6.38
>> builds. Is there anything preventing us from pulling in the patches
>> too?
>
> I'm coming in late; please forgive my ignorance.
>
> I assume the two patches in question are
>
>  v2.6.35-rc1~521^2~16 (sched: Cure load average vs NO_HZ woes, 2010-08-22)
>  v2.6.37-rc7~13^2~5 (sched: Cure more NO_HZ load average woes, 2010-11-30)
>
> The first does not apply cleanly to the 2.6.32.y tree but Lesław Kopeć
> backported it.  The other applies cleanly on top (and can be retrieved
> in patch form with "git show v2.6.37-rc7~13^2~5").
>
> So what would be most useful is:
>
>  1. Try a pristine 2.6.32.y kernel, to make sure it reproduces the problem.
>    If you already have a git checkout of the kernel:
>
>        cd linux
>        git remote add stable \
>          git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
>        git fetch stable
>
>    Otherwise:
>
>        git clone -o stable \
>          git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git \
>          linux
>        cd linux
>
>    Then build and test:
>
>        git checkout stable/linux-2.6.32.y
>        cp /boot/config-$(uname -r) .config; # stock configuration
>        make localmodconfig; # optional: minimize configuration
>        make deb-pkg; # optionally with -j<n> for parallel build
>        dpkg -i ../<name of package>
>        reboot
>
>  2. Try the patches, to make sure they fix it.
>
>        cd linux
>        git apply --index patch1
>        git apply --index patch2
>        make deb-pkg; # maybe with -j4
>        dpkg -i ../<name of package>
>        reboot
>
> If the problem is reproducible with current 2.6.32.y and the patches fix it,
> we can submit them upstream so everyone benefits.
>
> Thanks and hope that helps,
> Jonathan

Attachment: load-avg.png
Description: PNG image


Reply to: