All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Intel-gfx@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [RFC i-g-t v3] tests/gem_exec_pad_to_size: Test object padding at execbuf
Date: Wed, 01 Apr 2015 17:07:25 +0100	[thread overview]
Message-ID: <551C17BD.1010401@linux.intel.com> (raw)
In-Reply-To: <20150401154244.GK25832@nuc-i3427.alporthouse.com>


On 04/01/2015 04:42 PM, Chris Wilson wrote:
> On Wed, Apr 01, 2015 at 04:14:52PM +0100, Tvrtko Ursulin wrote:
>> +	/* Re-exec with padding set. */
>> +	igt_assert(exec(fd, eb_handles, pad_to_size, offsets) == 0);
>
> The crux of the test is that we generate two objects such that
>
> B_offset = A_offset + A_size
>
> and then tell the kernel that A is actually 2*size (A_pad_to_size)
>
>> +	if (offsets[1] > offsets[0])
>> +		distance = offsets[1] - offsets[0];
>> +	else
>> +		distance = offsets[0] - offsets[1];
>
> The assertion I feel should only be that
>
> B_offset + B_size <= A_offset && B_offset >= A_offset + A_pad_to_size

I don't get this. B starts after A + padding, but B ends before A?

> i.e. that they are now disjoint.
>
> Your test is valid nevertheless, it is the ordering of the objects that
> is confusing.
>
> Hmm, can you loop until B_offset == A_offset + A_size such that we don't
> have the confusion with order? And even assert that A_offset is
> unchanged (though that smells like a little to much internal knowledge
> leaking through, it is a desirable property of the allocator though - no
> unnecessarily eviction) afterwards.
>
> Do you agree that losing the handling of negative distances will make
> the test simpler to understand (at the expense of doing more work in the
> setup)?

I thought my test logic is pretty straightforward:

1. Find two objects next to each other.
2. Add padding on the "lower" (addressed) object.
3. Ensure objects are now apart at least what the padding is.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-04-01 16:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 14:21 [RFC i-g-t] tests/gem_exec_pad_to_size: Test object padding at execbuf Tvrtko Ursulin
2015-03-25 14:28 ` Chris Wilson
2015-03-25 14:32   ` Tvrtko Ursulin
2015-03-25 14:41     ` Chris Wilson
2015-03-25 14:57       ` Tvrtko Ursulin
2015-04-01 11:21 ` [RFC i-g-t v2] " Tvrtko Ursulin
2015-04-01 13:06   ` Chris Wilson
2015-04-01 13:17     ` Chris Wilson
2015-04-01 13:36     ` Tvrtko Ursulin
2015-04-01 13:56       ` Chris Wilson
2015-04-01 14:14         ` Tvrtko Ursulin
2015-04-01 14:27           ` Chris Wilson
2015-04-01 15:14 ` [RFC i-g-t v3] " Tvrtko Ursulin
2015-04-01 15:42   ` Chris Wilson
2015-04-01 16:07     ` Tvrtko Ursulin [this message]
2015-04-01 16:31       ` Chris Wilson
2015-04-01 16:39         ` Chris Wilson
2015-04-02 10:47           ` Tvrtko Ursulin
2015-04-02 10:45 ` [RFC i-g-t v4] " Tvrtko Ursulin
2015-04-02 11:02   ` Chris Wilson
2015-04-02 12:54 ` [RFC i-g-t v5] " Tvrtko Ursulin
2015-04-02 16:09   ` Thomas Wood

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=551C17BD.1010401@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=tvrtko.ursulin@intel.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.