From: Jerome Glisse <j.glisse@gmail.com>
To: Oded Gabbay <oded.gabbay@amd.com>
Cc: "David Airlie" <airlied@linux.ie>,
"Alex Deucher" <alexdeucher@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"John Bridgman" <John.Bridgman@amd.com>,
"Joerg Roedel" <joro@8bytes.org>,
"Andrew Lewycky" <Andrew.Lewycky@amd.com>,
"Christian König" <deathsimple@vodafone.de>,
"Michel Dänzer" <michel.daenzer@amd.com>,
"Ben Goz" <Ben.Goz@amd.com>,
"Alexey Skidanov" <Alexey.Skidanov@amd.com>,
"Evgeny Pinchuk" <Evgeny.Pinchuk@amd.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
"Rik van Riel" <riel@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Mel Gorman" <mgorman@suse.de>,
"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct
Date: Thu, 17 Jul 2014 10:12:18 -0400 [thread overview]
Message-ID: <20140717141216.GA1963@gmail.com> (raw)
In-Reply-To: <53C7D666.6000405@amd.com>
On Thu, Jul 17, 2014 at 04:57:58PM +0300, Oded Gabbay wrote:
> Forgot to add mm mailing list. Sorry.
>
> This patch enables the amdkfd driver to retrieve the kfd_process
> object from the process's mm_struct. This is needed because kfd_process
> lifespan is bound to the process's mm_struct lifespan.
>
> When amdkfd is notified about an mm_struct tear-down, it checks if the
> kfd_process pointer is valid. If so, it releases the kfd_process object
> and all relevant resources.
>
> In v3 of the patchset I will update the binding to match the final discussions
> on [PATCH 1/8] mmput: use notifier chain to call subsystem exit handler.
> In the meantime, I'm going to try and see if I can drop the kfd_process
> in mm_struct and remove the use of the new notification chain in mmput.
> Instead, I will try to use the mmu release notifier.
So the mmput notifier chain will not happen. I did a patch with call_srcu
and adding couple more helper to mmu_notifier. I will send that today for
review.
That being said, adding a device driver specific to mm_struct will most
likely be a big no. I am myself gonna remove hmm from mm_struct as people
are reluctant to see such change.
Cheers,
Jerome
>
> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
> ---
> include/linux/mm_types.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 678097c..ff71496 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -20,6 +20,10 @@
> struct hmm;
> #endif
> +#if defined(CONFIG_HSA_RADEON) || defined(CONFIG_HSA_RADEON_MODULE)
> +struct kfd_process;
> +#endif
> +
> #ifndef AT_VECTOR_SIZE_ARCH
> #define AT_VECTOR_SIZE_ARCH 0
> #endif
> @@ -439,6 +443,16 @@ struct mm_struct {
> */
> struct hmm *hmm;
> #endif
> +#if defined(CONFIG_HSA_RADEON) || defined(CONFIG_HSA_RADEON_MODULE)
> + /*
> + * kfd always register an mmu_notifier we rely on mmu notifier to keep
> + * refcount on mm struct as well as forbiding registering kfd on a
> + * dying mm
> + *
> + * This field is set with mmap_sem old in write mode.
> + */
> + struct kfd_process *kfd_process;
> +#endif
> #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
> pgtable_t pmd_huge_pte; /* protected by page_table_lock */
> #endif
> --
> 1.9.1
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Jerome Glisse <j.glisse@gmail.com>
To: Oded Gabbay <oded.gabbay@amd.com>
Cc: "David Airlie" <airlied@linux.ie>,
"Alex Deucher" <alexdeucher@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"John Bridgman" <John.Bridgman@amd.com>,
"Joerg Roedel" <joro@8bytes.org>,
"Andrew Lewycky" <Andrew.Lewycky@amd.com>,
"Christian König" <deathsimple@vodafone.de>,
"Michel Dänzer" <michel.daenzer@amd.com>,
"Ben Goz" <Ben.Goz@amd.com>,
"Alexey Skidanov" <Alexey.Skidanov@amd.com>,
"Evgeny Pinchuk" <Evgeny.Pinchuk@amd.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
"Rik van Riel" <riel@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Mel Gorman" <mgorman@suse.de>,
"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct
Date: Thu, 17 Jul 2014 10:12:18 -0400 [thread overview]
Message-ID: <20140717141216.GA1963@gmail.com> (raw)
In-Reply-To: <53C7D666.6000405@amd.com>
On Thu, Jul 17, 2014 at 04:57:58PM +0300, Oded Gabbay wrote:
> Forgot to add mm mailing list. Sorry.
>
> This patch enables the amdkfd driver to retrieve the kfd_process
> object from the process's mm_struct. This is needed because kfd_process
> lifespan is bound to the process's mm_struct lifespan.
>
> When amdkfd is notified about an mm_struct tear-down, it checks if the
> kfd_process pointer is valid. If so, it releases the kfd_process object
> and all relevant resources.
>
> In v3 of the patchset I will update the binding to match the final discussions
> on [PATCH 1/8] mmput: use notifier chain to call subsystem exit handler.
> In the meantime, I'm going to try and see if I can drop the kfd_process
> in mm_struct and remove the use of the new notification chain in mmput.
> Instead, I will try to use the mmu release notifier.
So the mmput notifier chain will not happen. I did a patch with call_srcu
and adding couple more helper to mmu_notifier. I will send that today for
review.
That being said, adding a device driver specific to mm_struct will most
likely be a big no. I am myself gonna remove hmm from mm_struct as people
are reluctant to see such change.
Cheers,
Jérôme
>
> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
> ---
> include/linux/mm_types.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 678097c..ff71496 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -20,6 +20,10 @@
> struct hmm;
> #endif
> +#if defined(CONFIG_HSA_RADEON) || defined(CONFIG_HSA_RADEON_MODULE)
> +struct kfd_process;
> +#endif
> +
> #ifndef AT_VECTOR_SIZE_ARCH
> #define AT_VECTOR_SIZE_ARCH 0
> #endif
> @@ -439,6 +443,16 @@ struct mm_struct {
> */
> struct hmm *hmm;
> #endif
> +#if defined(CONFIG_HSA_RADEON) || defined(CONFIG_HSA_RADEON_MODULE)
> + /*
> + * kfd always register an mmu_notifier we rely on mmu notifier to keep
> + * refcount on mm struct as well as forbiding registering kfd on a
> + * dying mm
> + *
> + * This field is set with mmap_sem old in write mode.
> + */
> + struct kfd_process *kfd_process;
> +#endif
> #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
> pgtable_t pmd_huge_pte; /* protected by page_table_lock */
> #endif
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-07-17 14:12 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1405603773-32688-1-git-send-email-oded.gabbay@amd.com>
2014-07-17 13:29 ` [PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 02/25] drm/radeon: reduce number of free VMIDs and pipes in KV Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 03/25] drm/radeon/cik: Don't touch int of pipes 1-7 Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 04/25] drm/radeon: Report doorbell configuration to amdkfd Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 05/25] drm/radeon: adding synchronization for GRBM GFX Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 06/25] drm/radeon: Add radeon <--> amdkfd interface Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 17:35 ` Jerome Glisse
2014-07-20 17:35 ` Jerome Glisse
2014-08-02 20:07 ` Oded Gabbay
2014-08-02 20:07 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 07/25] Update MAINTAINERS and CREDITS files with amdkfd info Oded Gabbay
[not found] ` <1405603773-32688-1-git-send-email-oded.gabbay-5C7GfCeVMHo@public.gmane.org>
2014-07-17 13:29 ` [PATCH v2 08/25] amdkfd: Add IOCTL set definitions of amdkfd Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
[not found] ` <1405603773-32688-9-git-send-email-oded.gabbay-5C7GfCeVMHo@public.gmane.org>
2014-07-20 16:54 ` Jerome Glisse
2014-07-20 16:54 ` Jerome Glisse
2014-08-02 20:00 ` Oded Gabbay
2014-08-02 20:00 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 09/25] amdkfd: Add amdkfd skeleton driver Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 17:09 ` Jerome Glisse
2014-07-20 17:09 ` Jerome Glisse
2014-08-02 19:55 ` Oded Gabbay
2014-08-02 19:55 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 10/25] amdkfd: Add topology module to amdkfd Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 22:37 ` Jerome Glisse
2014-07-20 22:37 ` Jerome Glisse
2014-07-27 11:15 ` Oded Gabbay
2014-07-27 11:15 ` Oded Gabbay
2014-07-30 12:10 ` Oded Gabbay
2014-07-30 12:10 ` Oded Gabbay
2014-07-27 11:26 ` Oded Gabbay
2014-07-27 11:26 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 11/25] amdkfd: Add basic modules " Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 23:02 ` Jerome Glisse
2014-07-20 23:02 ` Jerome Glisse
2014-08-02 19:25 ` Oded Gabbay
2014-08-02 19:25 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 12/25] amdkfd: Add binding/unbinding calls to amd_iommu driver Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 23:04 ` Jerome Glisse
2014-07-20 23:04 ` Jerome Glisse
2014-07-27 11:11 ` Oded Gabbay
2014-07-27 11:11 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 13/25] amdkfd: Add queue module Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 23:06 ` Jerome Glisse
2014-07-20 23:06 ` Jerome Glisse
2014-07-27 11:09 ` Oded Gabbay
2014-07-27 11:09 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 14/25] amdkfd: Add mqd_manager module Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-21 2:33 ` Jerome Glisse
2014-07-21 2:33 ` Jerome Glisse
2014-08-02 19:18 ` Oded Gabbay
2014-08-02 19:18 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 15/25] amdkfd: Add kernel queue module Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-21 2:42 ` Jerome Glisse
2014-07-21 2:42 ` Jerome Glisse
2014-07-27 11:05 ` Oded Gabbay
2014-07-27 11:05 ` Oded Gabbay
2014-07-27 12:40 ` Christian König
2014-07-27 12:40 ` Christian König
2014-07-17 13:29 ` [PATCH v2 16/25] amdkfd: Add module parameter of scheduling policy Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-21 2:45 ` Jerome Glisse
2014-07-21 2:45 ` Jerome Glisse
2014-07-27 10:21 ` Oded Gabbay
2014-07-27 10:21 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 17/25] amdkfd: Add packet manager module Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 18/25] amdkfd: Add process queue " Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 19/25] amdkfd: Add device " Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 20/25] amdkfd: Add interrupt handling module Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 21/25] amdkfd: Implement the create/destroy/update queue IOCTLs Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-20 23:09 ` Jerome Glisse
2014-07-20 23:09 ` Jerome Glisse
2014-07-27 10:15 ` Oded Gabbay
2014-07-27 10:15 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 22/25] amdkfd: Implement the Set Memory Policy IOCTL Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 23/25] amdkfd: Implement the Get Clock Counters IOCTL Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 24/25] amdkfd: Implement the Get Process Aperture IOCTL Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:29 ` [PATCH v2 25/25] amdkfd: Implement the PMC Acquire/Release IOCTLs Oded Gabbay
2014-07-17 13:29 ` Oded Gabbay
2014-07-17 13:57 ` [PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct Oded Gabbay
2014-07-17 13:57 ` Oded Gabbay
2014-07-17 14:12 ` Jerome Glisse [this message]
2014-07-17 14:12 ` Jerome Glisse
2014-07-17 14:15 ` Oded Gabbay
2014-07-17 14:15 ` Oded Gabbay
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=20140717141216.GA1963@gmail.com \
--to=j.glisse@gmail.com \
--cc=Alexey.Skidanov@amd.com \
--cc=Andrew.Lewycky@amd.com \
--cc=Ben.Goz@amd.com \
--cc=Evgeny.Pinchuk@amd.com \
--cc=John.Bridgman@amd.com \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=alexdeucher@gmail.com \
--cc=deathsimple@vodafone.de \
--cc=iamjoonsoo.kim@lge.com \
--cc=jglisse@redhat.com \
--cc=joro@8bytes.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=michel.daenzer@amd.com \
--cc=oded.gabbay@amd.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.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 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.