Bug#595711: linux-image-2.6.26-2-xen-686: Wrong free memory values for xen kernel with xenballoon use

2010-09-06 Thread Ian Campbell
On Mon, 2010-09-06 at 04:03 +0400, George Shuklin wrote:
 
 I belive, this somehow related to difference in drivers/xen/balloon.c,
 gentoo/SUSE version have some lines like 
 
 totalram_pages--;
 (in balloon_append() function)
 
 and 
   totalram_pages++;
 (in balloon_retrieve() function)
 
 Those lines are in Gentoo kernel  (linux-2.6.34-xen) but absent in
 Debian (linux-image-2.6.26-2-xen-686) 

Is the Gentoo kernel pvops or classic-Xen patches?

Are you sure you are using the classic-Xen
(linux-image-...-xen-{686,amd}) kernel rather than the pvops one
(linux-image-...-686-bigmem, no 64 bit pvops in Lenny)?

I wasn't aware that it applied to the classic-Xen case but the
difference you describe sounds like this commit from upstream pvops:

http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=3d65c9488cadd2f11bd4d60c7266e639ece5d0d6

Probably for a 2.6.26 classic-Xen kernel you'd need to adjust the path
to drivers/xen/balloon/balloon.c and perhaps tweak some context a bit
but the concept should still apply.

Ian.

-- 
Ian Campbell

Never laugh at live dragons.
-- Bilbo Baggins [J.R.R. Tolkien, The Hobbit]


signature.asc
Description: This is a digitally signed message part


Bug#595711: linux-image-2.6.26-2-xen-686: Wrong free memory values for xen kernel with xenballoon use

2010-09-06 Thread George Shuklin

В Пнд, 06/09/2010 в 07:59 +0100, Ian Campbell пишет:
 On Mon, 2010-09-06 at 04:03 +0400, George Shuklin wrote:
  
  I belive, this somehow related to difference in drivers/xen/balloon.c,
  gentoo/SUSE version have some lines like 
  
  totalram_pages--;
  (in balloon_append() function)
  
  and 
totalram_pages++;
  (in balloon_retrieve() function)
  
  Those lines are in Gentoo kernel  (linux-2.6.34-xen) but absent in
  Debian (linux-image-2.6.26-2-xen-686) 
 
 Is the Gentoo kernel pvops or classic-Xen patches?
 
 Are you sure you are using the classic-Xen
 (linux-image-...-xen-{686,amd}) kernel rather than the pvops one
 (linux-image-...-686-bigmem, no 64 bit pvops in Lenny)?
 
 I wasn't aware that it applied to the classic-Xen case but the
 difference you describe sounds like this commit from upstream pvops:
 
 http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=3d65c9488cadd2f11bd4d60c7266e639ece5d0d6
 
 Probably for a 2.6.26 classic-Xen kernel you'd need to adjust the path
 to drivers/xen/balloon/balloon.c and perhaps tweak some context a bit
 but the concept should still apply.

Classic Xen (xen-686). pv_ops does not support preinflated ballooning
(maxmem mem), so I stuck with classic xen.

I think, balloon code does not differ (principally) in pv_ops and
classic xen.

And, in any way, this bug exists. And it really suck: application ask
memory, one part of kernel (or libc?) thinking of free memory, kernel
found 'no memory left' and start OOM killer. It walking and killing some
random applications (include init).

I'm testing kernel with with patch right now and it seems work fine -
memory reporting correctly and oom kills only most bloated application
requesting tons of memory.


Ian.
 




--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1283798194.27572.17.ca...@home.desunote.ru



Bug#595711: linux-image-2.6.26-2-xen-686: Wrong free memory values for xen kernel with xenballoon use

2010-09-06 Thread Ian Campbell
On Mon, 2010-09-06 at 22:36 +0400, George Shuklin wrote:
 В Пнд, 06/09/2010 в 07:59 +0100, Ian Campbell пишет:
  On Mon, 2010-09-06 at 04:03 +0400, George Shuklin wrote:
   
   I belive, this somehow related to difference in drivers/xen/balloon.c,
   gentoo/SUSE version have some lines like 
   
   totalram_pages--;
   (in balloon_append() function)
   
   and 
 totalram_pages++;
   (in balloon_retrieve() function)
   
   Those lines are in Gentoo kernel  (linux-2.6.34-xen) but absent in
   Debian (linux-image-2.6.26-2-xen-686) 
  
  Is the Gentoo kernel pvops or classic-Xen patches?
  
  Are you sure you are using the classic-Xen
  (linux-image-...-xen-{686,amd}) kernel rather than the pvops one
  (linux-image-...-686-bigmem, no 64 bit pvops in Lenny)?
  
  I wasn't aware that it applied to the classic-Xen case but the
  difference you describe sounds like this commit from upstream pvops:
  
  http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=3d65c9488cadd2f11bd4d60c7266e639ece5d0d6
  
  Probably for a 2.6.26 classic-Xen kernel you'd need to adjust the path
  to drivers/xen/balloon/balloon.c and perhaps tweak some context a bit
  but the concept should still apply.
 
 Classic Xen (xen-686). pv_ops does not support preinflated ballooning
 (maxmem mem), so I stuck with classic xen.
 
 I think, balloon code does not differ (principally) in pv_ops and
 classic xen.
 
 And, in any way, this bug exists. And it really suck: application ask
 memory, one part of kernel (or libc?) thinking of free memory, kernel
 found 'no memory left' and start OOM killer. It walking and killing some
 random applications (include init).
 
 I'm testing kernel with with patch right now and it seems work fine -
 memory reporting correctly and oom kills only most bloated application
 requesting tons of memory.

Great, thanks for testing, this confirms that the issue is resolved by
this patch.

Dann, Is it OK to commit a backport of this changeset as the start of
2.6.26-26?

Ian.

-- 
Ian Campbell

Keep on keepin' on.


signature.asc
Description: This is a digitally signed message part


Bug#595711: linux-image-2.6.26-2-xen-686: Wrong free memory values for xen kernel with xenballoon use

2010-09-05 Thread George Shuklin
Package: linux-image-2.6.26-2-xen-686
Severity: important

I belive current version of xen (as domU) kernel for debian report free memory 
wrong: system reports lots of free memory, but acutally all memory is used up. 

Condition to reproduce:

Xen evnironment, maxmem is very large (10-20GiB memory), mem relativly low 
(800-900MiB).

Booted domU reports about 500MiB free, but if we try to use it, we will get 
swap (or oom/MemoryError is swap disabled) right after about 120MiB.

I test this behavior in newer gentoo/SUSE kernel and they in same condition 
show that about 750MiB is used (this match experemental data).

I belive, this somehow related to difference in drivers/xen/balloon.c, 
gentoo/SUSE version have some lines like 

totalram_pages--;
(in balloon_append() function)

and 
  totalram_pages++;
(in balloon_retrieve() function)

Those lines are in Gentoo kernel  (linux-2.6.34-xen) but absent in Debian 
(linux-image-2.6.26-2-xen-686)

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20100906000322.20160.86538.report...@desunote.ru