From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
"Huang Rui" <ray.huang-5C7GfCeVMHo@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list
Date: Tue, 14 Aug 2018 10:22:34 +0800 [thread overview]
Message-ID: <5B723CEA.1070903@amd.com> (raw)
In-Reply-To: <d0ebdd92-73a7-7959-4df0-391f3dd27526-5C7GfCeVMHo@public.gmane.org>
On 08/13/2018 06:16 PM, Christian König wrote:
> Am 13.08.2018 um 11:58 schrieb Huang Rui:
>> From: Christian König <christian.koenig@amd.com>
>>
>> Add bulk move pos to store the pointer of first and last buffer object.
>> The list in between will be bulk moved on lru list.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Signed-off-by: Huang Rui <ray.huang@amd.com>
>> Tested-by: Mike Lothian <mike@fireburn.co.uk>
>
> If you ask me that looks like it should work now, but I'm prepossessed because I helped creating this.
>
> Alex, David or Jerry can somebody else take a look as well?
Patch 1, 2, 3, 5 are
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Patch 4: comments inline.
BTW, a per-vm bo lru may be more efficient, but not a common way.
bulk move could improve that, while possibly there are some worse cases and better cases.
e.g. remark the bo position for target BO, like PD/PT bo and per-vm bo, in which range may include other BOs
If the target BO range include more other BOs, may cause evict or anything else low efficiency.
We hope target BO grouped together as much as possible, and be moved.
(if not, please correct me)
Regards,
Jerry
>
> Thanks,
> Christian.
>
>> ---
>> include/drm/ttm/ttm_bo_driver.h | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>>
>> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
>> index 3234cc3..e4fee8e 100644
>> --- a/include/drm/ttm/ttm_bo_driver.h
>> +++ b/include/drm/ttm/ttm_bo_driver.h
>> @@ -491,6 +491,34 @@ struct ttm_bo_device {
>> };
>> /**
>> + * struct ttm_lru_bulk_move_pos
>> + *
>> + * @first: first BO in the bulk move range
>> + * @last: last BO in the bulk move range
>> + *
>> + * Positions for a lru bulk move.
>> + */
>> +struct ttm_lru_bulk_move_pos {
>> + struct ttm_buffer_object *first;
>> + struct ttm_buffer_object *last;
>> +};
>> +
>> +/**
>> + * struct ttm_lru_bulk_move
>> + *
>> + * @tt: first/last lru entry for BOs in the TT domain
>> + * @vram: first/last lru entry for BOs in the VRAM domain
>> + * @swap: first/last lru entry for BOs on the swap list
>> + *
>> + * Helper structure for bulk moves on the LRU list.
>> + */
>> +struct ttm_lru_bulk_move {
>> + struct ttm_lru_bulk_move_pos tt[TTM_MAX_BO_PRIORITY];
>> + struct ttm_lru_bulk_move_pos vram[TTM_MAX_BO_PRIORITY];
>> + struct ttm_lru_bulk_move_pos swap[TTM_MAX_BO_PRIORITY];
>> +};
>> +
>> +/**
>> * ttm_flag_masked
>> *
>> * @old: Pointer to the result and original value.
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-08-14 2:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-13 9:58 [PATCH v3 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality Huang Rui
2018-08-13 9:58 ` [PATCH v3 3/5] drm/ttm: add bulk move function on LRU Huang Rui
[not found] ` <1534154331-11810-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-08-13 9:58 ` [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list Huang Rui
[not found] ` <1534154331-11810-2-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-08-13 10:16 ` Christian König
[not found] ` <d0ebdd92-73a7-7959-4df0-391f3dd27526-5C7GfCeVMHo@public.gmane.org>
2018-08-14 2:02 ` zhoucm1
[not found] ` <b993176a-cf49-d3b7-9be1-feb7dc95456f-5C7GfCeVMHo@public.gmane.org>
2018-08-14 2:25 ` Huang Rui
2018-08-14 2:22 ` Zhang, Jerry (Junwei) [this message]
[not found] ` <5B723CEA.1070903-5C7GfCeVMHo@public.gmane.org>
2018-08-14 2:49 ` Huang Rui
2018-08-13 9:58 ` [PATCH v3 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui
2018-08-13 9:58 ` [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3) Huang Rui
2018-08-14 2:26 ` Zhang, Jerry (Junwei)
[not found] ` <5B723DE3.50005-5C7GfCeVMHo@public.gmane.org>
2018-08-14 3:05 ` Huang Rui
2018-08-14 6:45 ` Christian König
[not found] ` <4f7e6d61-0b4a-5c12-38a9-ea905b9f6234-5C7GfCeVMHo@public.gmane.org>
2018-08-14 7:24 ` Huang Rui
2018-08-14 7:35 ` Christian König
[not found] ` <e1635b5e-e5a1-c4cf-005c-1920c6fc86e0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-14 8:17 ` Huang Rui
2018-08-13 9:58 ` [PATCH v3 5/5] drm/amdgpu: move PD/PT bos on LRU again Huang Rui
2018-08-16 0:41 ` [PATCH v3 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality Dieter Nützel
[not found] ` <70f3ba4a773f5ee3d1c46bc63991702a-0hun7QTegEsDD4udEopG9Q@public.gmane.org>
2018-08-17 10:06 ` Huang Rui
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=5B723CEA.1070903@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ray.huang-5C7GfCeVMHo@public.gmane.org \
/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).