All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhoucm1 <zhoucm1@amd.com>
To: Daniel Vetter <daniel@ffwll.ch>, Lucas Stach <l.stach@pengutronix.de>
Cc: ckoenig.leichtzumerken@gmail.com, Kai.Guo@amd.com,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Jerry.Zhang@amd.com
Subject: Re: [PATCH 01/13] ttm: abstruct evictable bo
Date: Wed, 9 May 2018 18:06:08 +0800	[thread overview]
Message-ID: <b4add567-d821-f255-2e2a-8fc340eead99@amd.com> (raw)
In-Reply-To: <20180509095026.GV28661@phenom.ffwll.local>



On 2018年05月09日 17:50, Daniel Vetter wrote:
> On Wed, May 09, 2018 at 10:34:51AM +0200, Lucas Stach wrote:
>> All of those changes are including a Change-Id that has no bearing in
>> upstream patches and are missing a proper commit description explaining
>> why a specific change is done.
> Imo the Change-Id: is ok if it makes people happy wrt internal tracking.
> Linus might blow up, but there's lots of random nonsense that Linus blows
> up on, so whatever.
Yeah, Change-Id is just used internal, When upstreaming, it is removed. 
Alex, right? I'm not clear how you handle that when you upstream our 
internal patches.

>
> Lack of real commit message that explains stuff is the real thing here I'd
> say.
Agree, lacking commit message is really bad, that could be because this 
is a big feature, I was busy with implementing before.
If Christian agree with my this idea, I will update more commit for 
every patch when sending again.

Thanks,
David Zhou
> -Daniel
>
>> Regards,
>> Lucas
>>
>> Am Mittwoch, den 09.05.2018, 14:45 +0800 schrieb Chunming Zhou:
>>> Change-Id: Ie81985282fab1e564fc2948109fae2173613b465
>>>> Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
>>> ---
>>>   drivers/gpu/drm/ttm/ttm_bo.c | 35 ++++++++++++++++++++++++-----------
>>>   1 file changed, 24 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
>>> index 98e06f8bf23b..15506682a0be 100644
>>> --- a/drivers/gpu/drm/ttm/ttm_bo.c
>>> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
>>> @@ -704,22 +704,20 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
>>>>   	return ret;
>>>   }
>>>   
>>> -static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
>>>> -			       uint32_t mem_type,
>>>> -			       const struct ttm_place *place,
>>>> -			       struct ttm_operation_ctx *ctx)
>>> +static struct ttm_buffer_object *
>>> +ttm_mem_get_evictable_bo(struct ttm_bo_device *bdev,
>>>> +			 uint32_t mem_type,
>>>> +			 const struct ttm_place *place,
>>>> +			 struct ttm_operation_ctx *ctx,
>>>> +			 bool *locked)
>>>   {
>>>> -	struct ttm_bo_global *glob = bdev->glob;
>>>> -	struct ttm_mem_type_manager *man = &bdev->man[mem_type];
>>>>   	struct ttm_buffer_object *bo = NULL;
>>>> -	bool locked = false;
>>>> -	unsigned i;
>>>> -	int ret;
>>>> +	struct ttm_mem_type_manager *man = &bdev->man[mem_type];
>>>> +	int i;
>>>   
>>>> -	spin_lock(&glob->lru_lock);
>>>>   	for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
>>>>   		list_for_each_entry(bo, &man->lru[i], lru) {
>>>> -			if (!ttm_bo_evict_swapout_allowable(bo, ctx, &locked))
>>>> +			if (!ttm_bo_evict_swapout_allowable(bo, ctx, locked))
>>>>   				continue;
>>>   
>>>>   			if (place && !bdev->driver->eviction_valuable(bo,
>>> @@ -738,6 +736,21 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
>>>>   		bo = NULL;
>>>>   	}
>>>   
>>>> +	return bo;
>>> +}
>>> +
>>> +static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
>>>> +			       uint32_t mem_type,
>>>> +			       const struct ttm_place *place,
>>>> +			       struct ttm_operation_ctx *ctx)
>>> +{
>>>> +	struct ttm_bo_global *glob = bdev->glob;
>>>> +	struct ttm_buffer_object *bo = NULL;
>>>> +	bool locked = false;
>>>> +	int ret;
>>> +
>>>> +	spin_lock(&glob->lru_lock);
>>>> +	bo = ttm_mem_get_evictable_bo(bdev, mem_type, place, ctx, &locked);
>>>>   	if (!bo) {
>>>>   		spin_unlock(&glob->lru_lock);
>>>>   		return -EBUSY;
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-05-09 10:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  6:45 [PATCH 00/13] *** per vm lru *** Chunming Zhou
2018-05-09  6:45 ` [PATCH 03/13] drm/amdgpu: add lru backend for amdgpu driver Chunming Zhou
2018-05-09  6:45 ` [PATCH 05/13] drm/amdgpu: pass vm lru to buffer object Chunming Zhou
2018-05-09  6:45 ` [PATCH 06/13] drm/amdgpu: add amdgpu lru implementation Chunming Zhou
2018-05-09  6:45 ` [PATCH 07/13] drm/ttm: export ttm_bo_ref_bug Chunming Zhou
     [not found] ` <20180509064543.15937-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-05-09  6:45   ` [PATCH 01/13] ttm: abstruct evictable bo Chunming Zhou
2018-05-09  8:34     ` Lucas Stach
2018-05-09  9:50       ` Daniel Vetter
2018-05-09 10:06         ` zhoucm1 [this message]
2018-05-09 16:04           ` Alex Deucher
2018-05-09  6:45   ` [PATCH 02/13] ttm: allow driver has own lru policy Chunming Zhou
2018-05-09  6:45   ` [PATCH 04/13] drm/amdgpu: init/fini vm lru Chunming Zhou
2018-05-09  6:45   ` [PATCH 08/13] drm/amdgpu: use RB tree instead of link list Chunming Zhou
2018-05-09  6:45   ` [PATCH 09/13] drm/amdgpu: add bo index counter Chunming Zhou
2018-05-09  6:45   ` [PATCH 10/13] drm/amdgpu: bulk move per vm bo Chunming Zhou
2018-05-09  6:45   ` [PATCH 12/13] drm/amdgpu: transferred bo doesn't use vm lru Chunming Zhou
2018-05-09  6:45   ` [PATCH 13/13] drm/amdgpu: free vm lru when vm fini Chunming Zhou
2018-05-09  6:45 ` [PATCH 11/13] ttm: export ttm_transfered_destroy Chunming Zhou
2018-05-10  5:07 ` [PATCH 00/13] *** per vm lru *** Zhang, Jerry (Junwei)
     [not found]   ` <5AF3D38F.1040704-5C7GfCeVMHo@public.gmane.org>
2018-05-10  8:45     ` zhoucm1
2018-05-14  5:44       ` Zhang, Jerry (Junwei)
     [not found]       ` <8c18f05c-54bc-47c8-8d63-8610420238cc-5C7GfCeVMHo@public.gmane.org>
2018-05-14  5:54         ` Zhang, Jerry (Junwei)

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=b4add567-d821-f255-2e2a-8fc340eead99@amd.com \
    --to=zhoucm1@amd.com \
    --cc=Jerry.Zhang@amd.com \
    --cc=Kai.Guo@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=l.stach@pengutronix.de \
    /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.