Skip to content

Commit 0a1ef9c

Browse files
committed
Merge tag 'kvm-s390-master-5.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master
The current number of KVM_IRQCHIP_NUM_PINS results in an order 3 allocation (32kb) for each guest start/restart which can result in OOM killer activity when kernel memory is fragmented enough. This fix reduces the number of iopins as s390 doesn't use them, hence reducing the memory footprint.
2 parents e4553b4 + 7749112 commit 0a1ef9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/s390/include/asm/kvm_host.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
#define KVM_USER_MEM_SLOTS 32
3232

3333
/*
34-
* These seem to be used for allocating ->chip in the routing table,
35-
* which we don't use. 4096 is an out-of-thin-air value. If we need
36-
* to look at ->chip later on, we'll need to revisit this.
34+
* These seem to be used for allocating ->chip in the routing table, which we
35+
* don't use. 1 is as small as we can get to reduce the needed memory. If we
36+
* need to look at ->chip later on, we'll need to revisit this.
3737
*/
3838
#define KVM_NR_IRQCHIPS 1
39-
#define KVM_IRQCHIP_NUM_PINS 4096
39+
#define KVM_IRQCHIP_NUM_PINS 1
4040
#define KVM_HALT_POLL_NS_DEFAULT 50000
4141

4242
/* s390-specific vcpu->requests bit members */

0 commit comments

Comments
 (0)