All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Ricardo Koller <ricarkol@google.com>
Cc: Colton Lewis <coltonlewis@google.com>,
	David Matlack <dmatlack@google.com>,
	kvm@vger.kernel.org, pbonzini@redhat.com, maz@kernel.org,
	oupton@google.com
Subject: Re: [PATCH v2 1/3] KVM: selftests: Create source of randomness for guest code.
Date: Thu, 1 Sep 2022 18:22:05 +0000	[thread overview]
Message-ID: <YxD4TcxXL38py7NS@google.com> (raw)
In-Reply-To: <YxDxagzRx0opmBBy@google.com>

On Thu, Sep 01, 2022, Ricardo Koller wrote:
> On Tue, Aug 30, 2022 at 07:01:57PM +0000, Colton Lewis wrote:
> > David Matlack <dmatlack@google.com> writes:
> > > I think this is broken if !partition_vcpu_memory_access. nr_randoms
> > > (per-vCPU) should be `nr_vcpus * vcpu_memory_bytes >> vm->page_shift`.
> > 
> > 
> > Agree it will break then and should not. But allocating that many more
> > random numbers may eat too much memory. In a test with 64 vcpus, it would
> > try to allocate 64x64 times as many random numbers. I'll try it but may
> > need something different in that case.
> 
> You might want to reconsider the idea of using a random number generator
> inside the guest. IRC the reasons against it were: quality of the random
> numbers, and that some random generators use floating-point numbers. I
> don't think the first one is a big issue. The second one might be an
> issue if we want to generate non-uniform distributions (e.g., poisson);
> but not a problem for now.

I'm pretty I had coded up a pseudo-RNG framework for selftests at one point, but
I cant find the code in my morass of branches and stashes :-(
 
Whatever we do, make sure the randomness and thus any failures are easily
reproducible, i.e. the RNG needs to be seeded pseudo-RNG, not fully random.

  reply	other threads:[~2022-09-01 18:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 21:41 [PATCH v2 0/3] Randomize memory access of dirty_log_perf_test Colton Lewis
2022-08-17 21:41 ` [PATCH v2 1/3] KVM: selftests: Create source of randomness for guest code Colton Lewis
2022-08-26 21:58   ` David Matlack
2022-08-30 19:01     ` Colton Lewis
2022-09-01 17:52       ` Ricardo Koller
2022-09-01 18:22         ` Sean Christopherson [this message]
2022-09-02 11:20           ` Andrew Jones
2022-09-01 17:37   ` Ricardo Koller
2022-08-17 21:41 ` [PATCH v2 2/3] KVM: selftests: Randomize which pages are written vs read Colton Lewis
2022-08-26 22:13   ` David Matlack
2022-08-30 19:02     ` Colton Lewis
2022-09-08 18:51       ` David Matlack
2022-09-08 19:46         ` Colton Lewis
2022-09-08 19:52           ` David Matlack
2022-08-17 21:41 ` [PATCH v2 3/3] KVM: selftests: Randomize page access order Colton Lewis
2022-08-18 21:41   ` Colton Lewis
2022-08-26 22:20   ` David Matlack
2022-08-30 19:02     ` Colton Lewis
2022-09-01 17:43   ` Ricardo Koller

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=YxD4TcxXL38py7NS@google.com \
    --to=seanjc@google.com \
    --cc=coltonlewis@google.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@google.com \
    --cc=pbonzini@redhat.com \
    --cc=ricarkol@google.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.