RE: [PATCH] drm/amdgpu: Need to set the baco cap before baco reset

2019-06-16 Thread Deng, Emily
Hi Philip, Could you help to try whether the attachment patch could help with the issue encounter? If it is OK, then I will send this patch out to review. Best wishes Emily Deng >-Original Message- >From: Deng, Emily >Sent: Monday, June 17, 2019 10:50 AM >To: Yang, Philip ; Russe

RE: [PATCH] drm/amdgpu: Need to set the baco cap before baco reset

2019-06-16 Thread Deng, Emily
Hi Philip, Sorry for introduce this issue for you. From the code, I couldn't see any issue. And I have tested the code in my Vega10, it is OK. So I think this is the kfd specific issue, but I couldn't reproduce issue on my platform. Could you create an ticket, and assign to me, and share m

Re: [PATCH v3 hmm 07/12] mm/hmm: Use lockdep instead of comments

2019-06-16 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v3 hmm 10/12] mm/hmm: Do not use list*_rcu() for hmm->ranges

2019-06-16 Thread Christoph Hellwig
On Thu, Jun 13, 2019 at 09:44:48PM -0300, Jason Gunthorpe wrote: > range->hmm = hmm; > kref_get(&hmm->kref); > - list_add_rcu(&range->list, &hmm->ranges); > + list_add(&range->list, &hmm->ranges); > > /* >* If there are any concurrent notifiers we have to wait fo

Re: [PATCH v3 hmm 09/12] mm/hmm: Poison hmm_range during unregister

2019-06-16 Thread Christoph Hellwig
> - /* Sanity check this really should not happen. */ > - if (hmm == NULL || range->end <= range->start) > - return; > - > mutex_lock(&hmm->lock); > list_del_rcu(&range->list); > mutex_unlock(&hmm->lock); > > /* Drop reference taken by hmm_range_registe

Re: [PATCH v3 hmm 11/12] mm/hmm: Remove confusing comment and logic from hmm_release

2019-06-16 Thread Christoph Hellwig
On Thu, Jun 13, 2019 at 09:44:49PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > hmm_release() is called exactly once per hmm. ops->release() cannot > accidentally trigger any action that would recurse back onto > hmm->mirrors_sem. In linux-next amdgpu actually calls hmm_mirror_unreg

Re: [PATCH v3 hmm 01/12] mm/hmm: fix use after free with struct hmm in the mmu notifiers

2019-06-16 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v3 hmm 08/12] mm/hmm: Remove racy protection against double-unregistration

2019-06-16 Thread Christoph Hellwig
On Thu, Jun 13, 2019 at 09:44:46PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > No other register/unregister kernel API attempts to provide this kind of > protection as it is inherently racy, so just drop it. > > Callers should provide their own protection, it appears nouveau alread

Re: [PATCH v3 hmm 03/12] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-16 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v3 hmm 02/12] mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register

2019-06-16 Thread Christoph Hellwig
On Thu, Jun 13, 2019 at 09:44:40PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > Ralph observes that hmm_range_register() can only be called by a driver > while a mirror is registered. Make this clear in the API by passing in the > mirror structure as a parameter. > > This also simpl

Re: [PATCH v3 hmm 12/12] mm/hmm: Fix error flows in hmm_invalidate_range_start

2019-06-16 Thread Christoph Hellwig
On Thu, Jun 13, 2019 at 09:44:50PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > If the trylock on the hmm->mirrors_sem fails the function will return > without decrementing the notifiers that were previously incremented. Since > the caller will not call invalidate_range_end() on EAGA

Re: [PATCH v3 hmm 05/12] mm/hmm: Remove duplicate condition test before wait_event_timeout

2019-06-16 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v3 hmm 04/12] mm/hmm: Simplify hmm_get_or_create and make it reliable

2019-06-16 Thread Christoph Hellwig
> + spin_lock(&mm->page_table_lock); > + if (mm->hmm) { > + if (kref_get_unless_zero(&mm->hmm->kref)) { > + spin_unlock(&mm->page_table_lock); > + return mm->hmm; > + } > + } > + spin_unlock(&mm->page_table_lock); This

Re: [PATCH v3 hmm 06/12] mm/hmm: Hold on to the mmget for the lifetime of the range

2019-06-16 Thread Christoph Hellwig
> mutex_lock(&hmm->lock); > - list_for_each_entry(range, &hmm->ranges, list) > - range->valid = false; > - wake_up_all(&hmm->wq); > + /* > + * Since hmm_range_register() holds the mmget() lock hmm_release() is > + * prevented as long as a range exists. > +

Re: [PATCH] drm/amd/powerplay/smu7_hwmgr: replace blocking delay with non-blocking

2019-06-16 Thread Yrjan Skrimstad
On Thu, Jun 13, 2019 at 09:57:24AM -0400, Alex Deucher wrote: > The patch is fine and I can apply it (I don't think there are any > restrictions on sleeping in sysfs), but this code only gets executed > when you actually read the power status from the card (e.g., via sysfs > or debugfs). Presumabl