From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib/intel_allocator: Add safe alignment as a default
Date: Thu, 24 Feb 2022 12:50:24 -0800 [thread overview]
Message-ID: <87v8x4htv3.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220224075415.18663-2-zbigniew.kempczynski@intel.com>
On Wed, 23 Feb 2022 23:54:14 -0800, Zbigniew Kempczyński wrote:
>
> diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
> index eabff1f9a..340b88828 100644
> --- a/lib/intel_allocator.c
> +++ b/lib/intel_allocator.c
> @@ -283,7 +283,8 @@ static bool __allocator_put(struct allocator *al)
> static struct intel_allocator *intel_allocator_create(int fd,
> uint64_t start, uint64_t end,
> uint8_t allocator_type,
> - uint8_t allocator_strategy)
> + uint8_t allocator_strategy,
> + uint64_t default_alignment)
> {
> struct intel_allocator *ial = NULL;
>
> @@ -321,6 +322,7 @@ static struct intel_allocator *intel_allocator_create(int fd,
>
> ial->type = allocator_type;
> ial->strategy = allocator_strategy;
> + ial->default_alignment = default_alignment;
Isn't this a better place to set default_alignment to
gem_detect_safe_alignment() rather than in __intel_allocator_open_full()
below (though I understand they are roughly equivalent)?
> @@ -903,6 +920,9 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
> req.open.end = gtt_size;
> }
>
> + if (!default_alignment)
> + req.open.default_alignment = gem_detect_safe_alignment(fd);
> +
/snip/
> @@ -948,20 +970,24 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
> uint64_t intel_allocator_open_full(int fd, uint32_t ctx,
> uint64_t start, uint64_t end,
> uint8_t allocator_type,
> - enum allocator_strategy strategy)
> + enum allocator_strategy strategy,
> + uint64_t default_alignment)
So we have added default_alignment to all these API's now and that does
provide additional flexibility but I am wondering if the additional
flexibility is really needed and will any IGT ever set default_alignment
other than 0 (i.e. let allocator choose safe_alignment)? And also does
having a different default_alignment improve test coverage in any way?
In any case, this is:
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
next prev parent reply other threads:[~2022-02-24 20:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 7:54 [igt-dev] [PATCH i-g-t 0/2] Use safe alignment as a default Zbigniew Kempczyński
2022-02-24 7:54 ` [igt-dev] [PATCH i-g-t 1/2] lib/intel_allocator: Add " Zbigniew Kempczyński
2022-02-24 20:50 ` Dixit, Ashutosh [this message]
2022-02-25 7:04 ` Zbigniew Kempczyński
2022-02-24 7:54 ` [igt-dev] [PATCH i-g-t 2/2] tests/api_intel_allocator: Add default-alignment test Zbigniew Kempczyński
2022-02-24 20:16 ` Dixit, Ashutosh
2022-02-25 7:22 ` Zbigniew Kempczyński
2022-02-24 8:57 ` [igt-dev] ✓ Fi.CI.BAT: success for Use safe alignment as a default (rev2) Patchwork
2022-02-24 21:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-25 7:26 ` Zbigniew Kempczyński
2022-02-25 16:25 ` Vudum, Lakshminarayana
2022-02-25 15:41 ` Patchwork
2022-02-25 16:04 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2022-02-23 10:33 [igt-dev] [PATCH i-g-t 0/2] Use safe alignment as a default Zbigniew Kempczyński
2022-02-23 10:33 ` [igt-dev] [PATCH i-g-t 1/2] lib/intel_allocator: Add " Zbigniew Kempczyński
2022-02-24 6:45 ` Dixit, Ashutosh
2022-02-24 7:49 ` Zbigniew Kempczyński
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=87v8x4htv3.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zbigniew.kempczynski@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.