From: Karolina Stolarek <karolina.stolarek@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3 02/17] lib/intel_allocator: Drop aliasing allocator handle api
Date: Wed, 12 Jul 2023 09:27:34 +0200 [thread overview]
Message-ID: <e83c2f27-a117-5e3b-8bea-14f2d1986c2c@intel.com> (raw)
In-Reply-To: <20230711112009.122482-3-zbigniew.kempczynski@intel.com>
On 11.07.2023 13:19, Zbigniew Kempczyński wrote:
> There's no real user of this api, lets drop it.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> --
> v3: Remove also ipc message passing for open-as (Karolina)
> ---
> lib/intel_allocator.c | 73 --------------------------------
> lib/intel_allocator.h | 1 -
> lib/intel_allocator_msgchannel.h | 8 +---
> 3 files changed, 1 insertion(+), 81 deletions(-)
>
Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com>
> diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
> index 8161221dbf..09f665fbb9 100644
> --- a/lib/intel_allocator.c
> +++ b/lib/intel_allocator.c
> @@ -25,7 +25,6 @@
> static const char *reqtype_str[] = {
> [REQ_STOP] = "stop",
> [REQ_OPEN] = "open",
> - [REQ_OPEN_AS] = "open as",
> [REQ_CLOSE] = "close",
> [REQ_ADDRESS_RANGE] = "address range",
> [REQ_ALLOC] = "alloc",
> @@ -376,19 +375,6 @@ static struct allocator *allocator_open(int fd, uint32_t ctx, uint32_t vm,
> return al;
> }
>
> -static struct allocator *allocator_open_as(struct allocator *base,
> - uint32_t new_vm, uint64_t *ahndp)
> -{
> - struct allocator *al;
> -
> - igt_assert(ahndp);
> - al = __allocator_create(base->fd, base->ctx, new_vm, base->ial);
> - __allocator_get(al);
> - *ahndp = __handle_create(al);
> -
> - return al;
> -}
> -
> static bool allocator_close(uint64_t ahnd)
> {
> struct allocator *al;
> @@ -512,47 +498,6 @@ static int handle_request(struct alloc_req *req, struct alloc_resp *resp)
> refcnt - 1, refcnt, ret - 1, ret);
> break;
>
> - case REQ_OPEN_AS:
> - /* lock first to avoid concurrent close */
> - pthread_mutex_lock(&map_mutex);
> -
> - al = __allocator_find_by_handle(req->allocator_handle);
> - resp->response_type = RESP_OPEN_AS;
> -
> - if (!al) {
> - alloc_info("<open as> [tid: %ld] ahnd: %" PRIx64
> - " -> no handle\n",
> - (long) req->tid, req->allocator_handle);
> - pthread_mutex_unlock(&map_mutex);
> - break;
> - }
> -
> - if (!al->vm) {
> - alloc_info("<open as> [tid: %ld] ahnd: %" PRIx64
> - " -> only open as for <fd, vm> is possible\n",
> - (long) req->tid, req->allocator_handle);
> - pthread_mutex_unlock(&map_mutex);
> - break;
> - }
> -
> -
> - al = allocator_open_as(al, req->open_as.new_vm, &ahnd);
> - refcnt = atomic_load(&al->refcount);
> - ret = atomic_load(&al->ial->refcount);
> - pthread_mutex_unlock(&map_mutex);
> -
> - resp->response_type = RESP_OPEN_AS;
> - resp->open.allocator_handle = ahnd;
> -
> - alloc_info("<open as> [tid: %ld] fd: %d, ahnd: %" PRIx64
> - ", ctx: %u, vm: %u"
> - ", alloc_type: %u, al->refcnt: %ld->%ld"
> - ", refcnt: %d->%d\n",
> - (long) req->tid, al->fd, ahnd,
> - al->ctx, al->vm, al->ial->type,
> - refcnt - 1, refcnt, ret - 1, ret);
> - break;
> -
> case REQ_CLOSE:
> pthread_mutex_lock(&map_mutex);
> al = __allocator_find_by_handle(req->allocator_handle);
> @@ -1037,24 +982,6 @@ uint64_t intel_allocator_open_vm(int fd, uint32_t vm, uint8_t allocator_type)
> ALLOC_STRATEGY_HIGH_TO_LOW, 0);
> }
>
> -uint64_t intel_allocator_open_vm_as(uint64_t allocator_handle, uint32_t new_vm)
> -{
> - struct alloc_req req = { .request_type = REQ_OPEN_AS,
> - .allocator_handle = allocator_handle,
> - .open_as.new_vm = new_vm };
> - struct alloc_resp resp;
> -
> - /* Get child_tid only once at open() */
> - if (child_tid == -1)
> - child_tid = gettid();
> -
> - igt_assert(handle_request(&req, &resp) == 0);
> - igt_assert(resp.open_as.allocator_handle);
> - igt_assert(resp.response_type == RESP_OPEN_AS);
> -
> - return resp.open.allocator_handle;
> -}
> -
> /**
> * intel_allocator_close:
> * @allocator_handle: handle to the allocator that will be closed
> diff --git a/lib/intel_allocator.h b/lib/intel_allocator.h
> index a6bf573e9d..3ec74f6191 100644
> --- a/lib/intel_allocator.h
> +++ b/lib/intel_allocator.h
> @@ -182,7 +182,6 @@ uint64_t intel_allocator_open_vm_full(int fd, uint32_t vm,
> enum allocator_strategy strategy,
> uint64_t default_alignment);
>
> -uint64_t intel_allocator_open_vm_as(uint64_t allocator_handle, uint32_t new_vm);
> bool intel_allocator_close(uint64_t allocator_handle);
> void intel_allocator_get_address_range(uint64_t allocator_handle,
> uint64_t *startp, uint64_t *endp);
> diff --git a/lib/intel_allocator_msgchannel.h b/lib/intel_allocator_msgchannel.h
> index cefbf4ce33..ba38530fd1 100644
> --- a/lib/intel_allocator_msgchannel.h
> +++ b/lib/intel_allocator_msgchannel.h
> @@ -13,7 +13,6 @@
> enum reqtype {
> REQ_STOP,
> REQ_OPEN,
> - REQ_OPEN_AS,
> REQ_CLOSE,
> REQ_ADDRESS_RANGE,
> REQ_ALLOC,
> @@ -27,7 +26,6 @@ enum reqtype {
>
> enum resptype {
> RESP_OPEN,
> - RESP_OPEN_AS,
> RESP_CLOSE,
> RESP_ADDRESS_RANGE,
> RESP_ALLOC,
> @@ -58,10 +56,6 @@ struct alloc_req {
> uint64_t default_alignment;
> } open;
>
> - struct {
> - uint32_t new_vm;
> - } open_as;
> -
> struct {
> uint32_t handle;
> uint64_t size;
> @@ -100,7 +94,7 @@ struct alloc_resp {
> union {
> struct {
> uint64_t allocator_handle;
> - } open, open_as;
> + } open;
>
> struct {
> bool is_empty;
next prev parent reply other threads:[~2023-07-12 7:27 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 11:19 [igt-dev] [PATCH i-g-t v3 00/17] Extend intel_blt to work on Xe Zbigniew Kempczyński
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 01/17] tests/api_intel_allocator: Don't use allocator ahnd aliasing api Zbigniew Kempczyński
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 02/17] lib/intel_allocator: Drop aliasing allocator handle api Zbigniew Kempczyński
2023-07-12 7:27 ` Karolina Stolarek [this message]
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 03/17] lib/intel_allocator: Remove extensive debugging Zbigniew Kempczyński
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 04/17] lib/xe_ioctl: Export non-assert xe_exec function Zbigniew Kempczyński
2023-07-12 7:33 ` Karolina Stolarek
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 05/17] lib/xe_query: Use vramN when returning string region name Zbigniew Kempczyński
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 06/17] lib/xe_query: Add xe_region_class() helper Zbigniew Kempczyński
2023-07-11 11:19 ` [igt-dev] [PATCH i-g-t v3 07/17] lib/drmtest: Add get_intel_driver() helper Zbigniew Kempczyński
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 08/17] lib/xe_util: Return dynamic subtest name for Xe Zbigniew Kempczyński
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 09/17] lib/xe_util: Add vm bind/unbind helper " Zbigniew Kempczyński
2023-07-12 8:00 ` Karolina Stolarek
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 10/17] lib/intel_allocator: Add intel_allocator_bind() Zbigniew Kempczyński
2023-07-12 9:13 ` Karolina Stolarek
2023-07-12 9:33 ` Zbigniew Kempczyński
2023-07-12 10:39 ` Karolina Stolarek
2023-07-12 17:03 ` Zbigniew Kempczyński
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 11/17] lib/intel_ctx: Add xe context information Zbigniew Kempczyński
2023-07-12 9:14 ` Karolina Stolarek
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 12/17] lib/intel_blt: Introduce blt_copy_init() helper to cache driver Zbigniew Kempczyński
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 13/17] lib/intel_blt: Extend blitter library to support xe driver Zbigniew Kempczyński
2023-07-12 9:22 ` Karolina Stolarek
2023-07-12 9:43 ` Zbigniew Kempczyński
2023-07-12 10:22 ` Karolina Stolarek
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 14/17] tests/xe_ccs: Check if flatccs is working with block-copy for Xe Zbigniew Kempczyński
2023-07-12 10:02 ` Karolina Stolarek
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 15/17] tests/xe_exercise_blt: Check blitter library fast-copy " Zbigniew Kempczyński
2023-07-12 10:18 ` Karolina Stolarek
2023-07-12 17:05 ` Zbigniew Kempczyński
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 16/17] tests/api-intel-allocator: Adopt to exercise allocator to Xe Zbigniew Kempczyński
2023-07-11 11:20 ` [igt-dev] [PATCH i-g-t v3 17/17] tests/gem_ccs: Avoid writing png twice Zbigniew Kempczyński
2023-07-12 9:24 ` Karolina Stolarek
2023-07-11 11:40 ` [igt-dev] ✗ GitLab.Pipeline: warning for Extend intel_blt to work on Xe (rev3) Patchwork
2023-07-11 12:09 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-11 12:10 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-07-11 14:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-12 8:14 ` Zbigniew Kempczyński
2023-07-14 4:56 ` Yedireswarapu, SaiX Nandan
2023-07-14 4:48 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
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=e83c2f27-a117-5e3b-8bea-14f2d1986c2c@intel.com \
--to=karolina.stolarek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox