All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: thuth@redhat.com, david@redhat.com, cohuck@redhat.com,
	qemu-devel@nongnu.org, borntraeger@de.ibm.com,
	qemu-s390x@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH v7 3/4] kvm: split too big memory section on several memslots
Date: Wed, 25 Sep 2019 14:09:15 +0200	[thread overview]
Message-ID: <20190925140915.3d43c8ab@redhat.com> (raw)
In-Reply-To: <20190925031211.GH28074@xz-x1>

On Wed, 25 Sep 2019 11:12:11 +0800
Peter Xu <peterx@redhat.com> wrote:

> On Tue, Sep 24, 2019 at 10:47:50AM -0400, Igor Mammedov wrote:
> 
> [...]
> 
> > @@ -2877,6 +2912,7 @@ static bool kvm_accel_has_memory(MachineState *ms, AddressSpace *as,
> >  
> >      for (i = 0; i < kvm->nr_as; ++i) {
> >          if (kvm->as[i].as == as && kvm->as[i].ml) {
> > +            size = MIN(kvm_max_slot_size, size);
> >              return NULL != kvm_lookup_matching_slot(kvm->as[i].ml,
> >                                                      start_addr, size);
> >          }  
> 
> Ideally we could also check that the whole (start_addr, size) region
> is covered by KVM memslots here, but with current code I can't think
> of a case where the result doesn't match with only checking the 1st
> memslot. So I assume it's fine.
yep, it's micro-optimization that works on assumption that whole memory
section always is covered by memslots and original semantics where
working only for if start_addr/size where covering whole memory section.

Sole user mtree_print_flatview() is not performance sensitive,
so if you'd like I can post an additional patch that iterates
over whole range.

> Reviewed-by: Peter Xu <peterx@redhat.com>
> 



  reply	other threads:[~2019-09-25 12:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 14:47 [PATCH v7 0/4] s390: stop abusing memory_region_allocate_system_memory() Igor Mammedov
2019-09-24 14:47 ` [PATCH v7 1/4] kvm: extract kvm_log_clear_one_slot Igor Mammedov
2019-09-30 10:25   ` Christian Borntraeger
2019-09-24 14:47 ` [PATCH v7 2/4] kvm: clear dirty bitmaps from all overlapping memslots Igor Mammedov
2019-09-24 14:47 ` [PATCH v7 3/4] kvm: split too big memory section on several memslots Igor Mammedov
2019-09-25  3:12   ` Peter Xu
2019-09-25 12:09     ` Igor Mammedov [this message]
2019-09-25 23:45       ` Peter Xu
2019-09-24 14:47 ` [PATCH v7 4/4] s390: do not call memory_region_allocate_system_memory() multiple times Igor Mammedov
2019-09-25  3:27   ` Peter Xu
2019-09-25 11:51     ` Igor Mammedov
2019-09-25 23:52       ` Peter Xu
2019-09-27 13:33         ` Igor Mammedov
2019-09-28  1:28           ` Peter Xu
2019-09-30  7:09             ` Christian Borntraeger
2019-09-30  9:33               ` Igor Mammedov
2019-09-30 10:04                 ` Christian Borntraeger
2019-09-30 10:35                   ` Paolo Bonzini
2019-09-25  7:47 ` [PATCH v7 0/4] s390: stop abusing memory_region_allocate_system_memory() Christian Borntraeger
2019-09-30 11:00 ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190925140915.3d43c8ab@redhat.com \
    --to=imammedo@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.