From: Liang Chen <liangchen.linux@gmail.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH v2] KVM: x86: count actual tlb flushes
Date: Thu, 18 Sep 2014 10:47:36 -0400 [thread overview]
Message-ID: <541AF088.20101@gmail.com> (raw)
In-Reply-To: <20140918140011.GB16538@potion.brq.redhat.com>
On 09/18/2014 10:00 AM, Radim Krčmář wrote:
> 2014-09-17 14:35-0400, Liang Chen:
>> - we count KVM_REQ_TLB_FLUSH requests, not actual flushes
>> (KVM can have multiple requests for one flush)
>> - flushes from kvm_flush_remote_tlbs aren't counted
>> - it's easy to make a direct request by mistake
>>
>> Solve these by postponing the counting to kvm_check_request(),
>> and refactor the code to use kvm_make_request again.
>>
>> Signed-off-by: Liang Chen <liangchen.linux@gmail.com>
>> ---
>> Changes since v2:
>>
>> * Instead of calling kvm_mmu_flush_tlb everywhere to make sure the
>> stat is always incremented, postponing the counting to
>> kvm_check_request.
>>
>> (The idea comes from Radim. Much of the work is indeed done by him
>> and is included in this patch, otherwise I couldn't start working
>> on the followup work as I promised early. As I'm new to kvm
>> development, please let me know if I am doing wrong here.)
> I found (shame on me) Documentation/development-process/ when looking
> how to help and it looks really good.
> (If you read it, the rest of my mail will be obsolete :)
>
> You usually want to Cc linux-kernel@vger.kernel.org.
> (I've heard that someone actually reads it directly and it is a good
> archive otherwise. It allows people to `git blame` your code and find
> the discussion in their preferred mail reader.)
>
> The hard part about posting a patch is splitting it ...
> You want to separate logical changes to make the code maintainable:
> For this patch, I would create at least two-part series (cover letter!)
>
> - change the meaning of tlb_flush
> - refactor code
>
> And see if it would make sense to split the refactoring further or if it
> breaks when only a first part of the whole series is applied.
>
> It's not a problem if your code depends on unmerged patches, you can
> include someone else's code in the series as long as it isn't modified.
> (Which probably is better than just mentioning that your code depends on
> some other patches from the list, but I'm not applying it ... Paolo?)
Thank you very much for the help! Creating a patch series and including
your patch intact as the first one sound to be the best ;)
Thanks,
Liang
prev parent reply other threads:[~2014-09-18 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 18:35 [PATCH v2] KVM: x86: count actual tlb flushes Liang Chen
2014-09-18 5:05 ` Xiao Guangrong
2014-09-18 12:47 ` Paolo Bonzini
2014-09-18 13:49 ` Liang Chen
2014-09-18 14:08 ` Radim Krčmář
2014-09-18 14:00 ` Radim Krčmář
2014-09-18 14:47 ` Liang Chen [this message]
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=541AF088.20101@gmail.com \
--to=liangchen.linux@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox