All of lore.kernel.org
 help / color / mirror / Atom feed
From: Izik Eidus <ieidus@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity
Date: Thu, 11 Jun 2009 12:44:09 +0300	[thread overview]
Message-ID: <4A30D1E9.3090106@redhat.com> (raw)
In-Reply-To: <4A30BF4F.70406@redhat.com>

Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Izik Eidus wrote:
>   
>> +		if (!kvm_x86_ops->dirty_bit_support()) {
>> +			spin_lock(&kvm->mmu_lock);
>> +			/*  remove_write_access() flush the tlb */
>> +			kvm_mmu_slot_remove_write_access(kvm, log->slot);
>> +			spin_unlock(&kvm->mmu_lock);
>> +		} else {
>> +			kvm_flush_remote_tlbs(kvm);
>>     
>
>   

Hi.

> It might not correspond to the common style, but I think a callback
> function ->dirty_bit_support is overkill.  This is a function pointer
> the compiler cannot see through.  Hence it's an indirect function call.
>  But the implementation is always a simple yes/no (it seems).  Indirect
> calls are rather expensive (most of the time they cannot be predicted
> right).
>   

This function pointer will be called once every ioctl to get the dirty 
bit tracking, so i dont think it is a big issue (normal 30 times a sec)

> Why not instead have a read-only data constants and have an inline
> function test that value?  It means no function call and only one data
> access.
>   

May be relevent, but i dont sure if it is needed optimization for this 
patch consider the amount of time ->dirty_bit_support() will be called

>
> Also, you're inconsistent in the use of integers and true/false in the
> implementations of this function.  Either use 0/1 or false/true.
>   

I will fix it, thanks.

> - --
> ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkowv08ACgkQ2ijCOnn/RHR71ACdH3xr3XPnCLgsMMwdTawfehEN
> vs4An2DlErhU6SeanSYVIyP3eLB4sjsz
> =UZ32
> -----END PGP SIGNATURE-----
>   


  reply	other threads:[~2009-06-11  9:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 16:23 [PATCH 0/2] RFC use dirty bit for page dirty tracking (v2) Izik Eidus
2009-06-10 16:23 ` [PATCH 1/2] kvm: fix dirty bit tracking for slots with large pages Izik Eidus
2009-06-10 16:23   ` [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity Izik Eidus
2009-06-10 17:00     ` Izik Eidus
2009-06-10 20:42     ` Marcelo Tosatti
2009-06-10 23:57       ` Izik Eidus
2009-06-10 23:59         ` Izik Eidus
2009-06-11  1:04         ` Marcelo Tosatti
2009-06-11 11:27           ` Izik Eidus
2009-06-11 12:24             ` Marcelo Tosatti
2009-06-11 15:49               ` Izik Eidus
2009-06-11  8:24     ` Ulrich Drepper
2009-06-11  9:44       ` Izik Eidus [this message]
2009-06-11  9:33     ` Avi Kivity
2009-06-11  9:48       ` Izik Eidus
2009-06-11  9:53         ` Avi Kivity
2009-06-14 11:10   ` [PATCH 1/2] kvm: fix dirty bit tracking for slots with large pages Avi Kivity
2009-06-15 14:58 ` [PATCH 0/2] RFC use dirty bit for page dirty tracking (v2) Ryan Harper
2009-06-15 15:19   ` Avi Kivity
2009-07-07  3:32     ` Ryan Harper
2009-07-07  5:11       ` Avi Kivity

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=4A30D1E9.3090106@redhat.com \
    --to=ieidus@redhat.com \
    --cc=avi@redhat.com \
    --cc=drepper@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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.