linux-next: manual merge of the akpm tree with the kvm tree

From: Stephen Rothwell
Date: Mon Jun 17 2013 - 04:07:49 EST


Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
arch/x86/kvm/mmu.c between commit 365c886860c4 ("KVM: MMU: reclaim the
zapped-obsolete page first") from the kvm tree and commit "shrinker:
convert remaining shrinkers to count/scan API" from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc arch/x86/kvm/mmu.c
index 6941fa7,422493d..0000000
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@@ -4312,12 -4213,8 +4312,13 @@@ restart
spin_unlock(&kvm->mmu_lock);
}

+static bool kvm_has_zapped_obsolete_pages(struct kvm *kvm)
+{
+ return unlikely(!list_empty_careful(&kvm->arch.zapped_obsolete_pages));
+}
+
- static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc)
+ static long
+ mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
{
struct kvm *kvm;
int nr_to_scan = sc->nr_to_scan;
@@@ -4352,16 -4246,9 +4351,16 @@@
idx = srcu_read_lock(&kvm->srcu);
spin_lock(&kvm->mmu_lock);

+ if (kvm_has_zapped_obsolete_pages(kvm)) {
+ kvm_mmu_commit_zap_page(kvm,
+ &kvm->arch.zapped_obsolete_pages);
+ goto unlock;
+ }
+
- prepare_zap_oldest_mmu_page(kvm, &invalid_list);
+ freed += prepare_zap_oldest_mmu_page(kvm, &invalid_list);
kvm_mmu_commit_zap_page(kvm, &invalid_list);

+unlock:
spin_unlock(&kvm->mmu_lock);
srcu_read_unlock(&kvm->srcu, idx);

Attachment: pgp00000.pgp
Description: PGP signature