From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 1/1] iommu/amd: Use delayed mmu release notifier Date: Thu, 6 Nov 2014 14:33:54 +0100 Message-ID: <20141106133354.GP10744@8bytes.org> References: <54418D7F.3050304@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54418D7F.3050304-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Oded Gabbay Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Sat, Oct 18, 2014 at 12:43:27AM +0300, Oded Gabbay wrote: > 3. Later, amdkfd's mmu notifier callback (kfd_process_notifier_release()) gets > called and releases more things that are related to the process. > In that function, amd_iommu_unbind_pasid() is explicitly called. Can't you just register a delayed funtion in kfd_process_notifier_release() and call amd_iommu_unbind_pasid() from there? I really hate to make that part of the IOMMUv2 driver API, especially since it is going to be turned into a generic IOMMU-API extension. And especially since all these hacks could be avoided if the KFD driver would just turn down everything on closing the file descriptor. Joerg