linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	kvm@vger.kernel.org, Janosch Frank <frankja@linux.ibm.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-s390@vger.kernel.org, "Cornelia Huck" <cohuck@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Shuah Khan" <shuah@kernel.org>, "Peter Xu" <peterx@redhat.com>
Subject: Re: [PATCH 2/2] KVM: selftests: Enable dirty_log_test on s390x
Date: Wed, 31 Jul 2019 13:06:03 +0200	[thread overview]
Message-ID: <03e7f73e-2b21-688b-83c6-c10eaafdebd5@redhat.com> (raw)
In-Reply-To: <341c3705-c2cb-9e87-cc03-42e0cefba308@de.ibm.com>

On 30.07.19 20:04, Christian Borntraeger wrote:
> 
> 
> On 30.07.19 19:11, Thomas Huth wrote:
>> On 30/07/2019 16.57, Christian Borntraeger wrote:
>>>
>>>
>>> On 30.07.19 12:01, Thomas Huth wrote:
>>>> To run the dirty_log_test on s390x, we have to make sure that we
>>>> access the dirty log bitmap with little endian byte ordering and
>>>> we have to properly align the memslot of the guest.
>>>> Also all dirty bits of a segment are set once on s390x when one
>>>> of the pages of a segment are written to for the first time, so
>>>> we have to make sure that we touch all pages during the first
>>>> iteration to keep the test in sync here.
>>>
>>> While this fixes the test (and the migration does work fine), it still
>>> means that s390x overindicates the dirty bit for sparsely populated
>>> 1M segments. It is just a performance issue, but maybe we should try 
>>> to get this fixed.
>>
>> I hope you don't expect me to fix this - the gmap code is really not my
>> turf...
> 
> No, this is clearly on our turf. 

FWIW, we share the pagetables with the userspace process. We mark a page
as dirty (PGSTE_UC_BIT) when
- We modify the storage key
- We map a PTE as RW (pgste_set_pte())

I assume all PTEs of the segment are mapped RW (for example, if user
space wrote to such a PTE), that is why we have the PGSTE_UC_BIT bit set.

As PGSTE_UC_BIT also tracks what userspace did, not only KVM via the
GMAP, this might indeed be correct.

-- 

Thanks,

David / dhildenb

  reply	other threads:[~2019-07-31 11:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 10:01 [PATCH 0/2] KVM: selftests: Enable ucall and dirty_log_test on s390x Thomas Huth
2019-07-30 10:01 ` [PATCH 1/2] KVM: selftests: Implement ucall() for s390x Thomas Huth
2019-07-30 10:48   ` Andrew Jones
2019-07-31  9:43     ` Thomas Huth
2019-07-31 10:28       ` Andrew Jones
2019-07-31 11:16         ` Thomas Huth
2019-07-31 12:57           ` Paolo Bonzini
2019-07-31 13:05             ` Andrew Jones
2019-07-30 10:01 ` [PATCH 2/2] KVM: selftests: Enable dirty_log_test on s390x Thomas Huth
2019-07-30 10:57   ` Andrew Jones
2019-07-31  8:19     ` Thomas Huth
2019-07-31  8:44       ` Andrew Jones
2019-07-31 12:58       ` Paolo Bonzini
2019-07-30 11:35   ` Paolo Bonzini
2019-07-30 14:57   ` Christian Borntraeger
2019-07-30 17:11     ` Thomas Huth
2019-07-30 18:04       ` Christian Borntraeger
2019-07-31 11:06         ` David Hildenbrand [this message]
2019-07-30 19:06     ` Paolo Bonzini
2019-07-31  7:16       ` Christian Borntraeger
2019-07-30 11:36 ` [PATCH 0/2] KVM: selftests: Enable ucall and " Paolo Bonzini

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=03e7f73e-2b21-688b-83c6-c10eaafdebd5@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=shuah@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).